_table = 'shop_project'; $this->_primary = 'id'; $this->_fields = [ "id",// int unsigned NOT NULL AUTO_INCREMENT, 'enterprise_id',// int NOT NULL COMMENT '商店id', "shop_id",// int NOT NULL COMMENT '商店id', "name",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目名称', "image",//varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '封面图', "slider_image",// varchar(2550) COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图', "price",// decimal(10,2) NOT NULL COMMENT '现价', "ot_price",// decimal(10,2) NOT NULL COMMENT '原价', "cost_price",// decimal(10,2) NOT NULL COMMENT '成本价', "info",// varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简介', "result",// text COLLATE utf8mb4_general_ci COMMENT '介绍', "is_show",// tinyint NOT NULL DEFAULT '1' COMMENT '0下架1使用', "service_time",// int DEFAULT NULL COMMENT '服务时间', "createTime",// int DEFAULT NULL COMMENT '创建时间', "commission",// decimal(10,2) DEFAULT NULL COMMENT '提成比列', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; parent::__construct($serviceDB); } }