1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /**
- * 订单Dao
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/10/31
- * Time: 15:49
- */
- namespace Jobs\Dao\Order;
- use Jobs\Dao\BaseDao;
- class DOrder extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'order';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT,
- "no", //char(20) NOT NULL COMMENT '订单编号',
- "shopId", //int(10) NOT NULL DEFAULT '0' COMMENT '店铺id',
- "shopName",
- "outerTradeNo", //varchar(255) NOT NULL DEFAULT '' COMMENT '外部流水号(支付宝/微信返回的流水号)',
- "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '总金额',
- "payAmount", //decimal(12,2) DEFAULT '0.00' COMMENT '实付金额',
- "buyTotal", //int(10) NOT NULL DEFAULT '0' COMMENT '购买总数',
- "customerName", //varchar(50) NOT NULL COMMENT '客户姓名',
- "customerId", //int(10) NOT NULL COMMENT '客户id',
- "payStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '支付状态 默认1 未支付 2已支付',
- "orderStatus", //tinyint(3) NOT NULL DEFAULT '2' COMMENT '订单状态 默认 2待支付 3代发货 4待收货 5已完成 6已关闭',
- "payType", //tinyint(3) DEFAULT NULL COMMENT '支付方式 1微信 2支付宝 3货到付款 4上门自提',
- "deliveryType", //tinyint(3) DEFAULT NULL COMMENT '配送方式 1商品配送 2上门自提',
- "source", //tinyint(3) DEFAULT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建',
- "remark", //varchar(255) NOT NULL DEFAULT '' COMMENT '订单备注',
- "extends", //json DEFAULT NULL COMMENT '拓展字段',
- "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
- "auditStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '审核状态 默认1 待审 2审核通过 3 审核未通过 4 审核中',
- "payTime", //int(10) NOT NULL DEFAULT '0' COMMENT '付款时间',
- "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
- "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
- "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id',
- "salesManId", //int(10) DEFAULT '0' COMMENT '业务员id',
- "salesManName", //varchar(255) DEFAULT NULL COMMENT '业务员名称',
- "customerType", //tinyint(3) DEFAULT NULL COMMENT '客户类型',
- "userCenterId", //int(10) DEFAULT NULL COMMENT 'userCenterId',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|