_table = 'cashier_cart'; $this->_primary = 'id'; $this->_fields = [ "id",//int(10) NOT NULL AUTO_INCREMENT, "goodsCode",//varchar(255) DEFAULT '' COMMENT '商品编号', "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品Id', "buyNum",//int(10) NOT NULL COMMENT '购买数量', "cashierUid",//int(10) NOT NULL DEFAULT '0' COMMENT '收银员id', "shopId",//int(10) NOT NULL DEFAULT '0' COMMENT '店铺Id', "selection",//tinyint(3) NOT NULL DEFAULT '4' COMMENT '是否选中 默认4 未选中 5已选中', "source",//tinyint(3) DEFAULT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建', "extends",//json DEFAULT NULL COMMENT '拓展字段', "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', "skuId",//int(10) DEFAULT NULL COMMENT '计量单位id', "goodsBasicId",//int(10) DEFAULT NULL COMMENT 'goodsBasicId', "shopCode",//varchar(255) DEFAULT '' COMMENT '店铺编码', "warehouseId",//int(10) DEFAULT NULL COMMENT '仓库id', "activityId",//int(10) DEFAULT '0' COMMENT '活动id', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }