_table = 'shop_card_order'; $this->_primary = 'id'; $this->_fields = [ "id",// int unsigned NOT NULL AUTO_INCREMENT, "enterprise_id",// int NOT NULL COMMENT '门店id', "card_id", //int NOT NULL COMMENT '购买优惠卡', "customer_id",// int NOT NULL COMMENT '客户id', "order_id",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL, "ot_price",// decimal(10,2) NOT NULL COMMENT '总金额', "pay_price", //decimal(10,2) NOT NULL COMMENT '实际支付金额', "paid",// int NOT NULL COMMENT '0未支付1已支付', 'pay_type', // tinyint NOT NULL COMMENT '1余额2微信3支付宝', "createTime",// int NOT NULL, ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; parent::__construct($serviceDB); } }