_table = 'qianniao_oem_details'; $this->_primary = 'id'; $this->_fields = [ 'id',//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', 'enterpriseId',//int(11) NOT NULL COMMENT '企业id', 'enterpriseName',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '企业名称', 'mealId',// int(11) NOT NULL DEFAULT '0' COMMENT '套餐id', 'meal',// varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '套餐名称', 'mobile',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号', 'type',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消费类型', 'beforeMoney',//decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '消费前余额', 'money',//decimal(11,2) NOT NULL COMMENT '余额', 'afterMoney',//decimal(11,2) NOT NULL COMMENT '消费后余额', 'explain',//varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '说明', 'createTime',//int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', 'extend',//json DEFAULT NULL COMMENT '扩展字段', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }