_table = 'shop_subscribe'; $this->_primary = 'id'; $this->_fields = [ "id", // int unsigned NOT NULL AUTO_INCREMENT, "uid",// int NOT NULL COMMENT '员工id', 'order_id',// varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单号', "customer_id", // int NOT NULL COMMENT '客户id', "shop_id", // int NOT NULL COMMENT '门店id', "project", // varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '选择项目', "to_price", // decimal(10,2) NOT NULL COMMENT '总价', "discount_price", // decimal(10,2) NOT NULL COMMENT '优惠金额', "pay_price", // decimal(10,2) NOT NULL COMMENT '实际支付', "cost_price",// decimal(10,2) NOT NULL COMMENT '成本 "stay_price",// decimal(10,2) DEFAULT NULL COMMENT '待支付金额', "paid", // tinyint NOT NULL DEFAULT '0' COMMENT '支付状态', "duration", // char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '预约时长', "time", // int NOT NULL COMMENT '预约时间段', "remarks", // text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备注', "refund",// tinyint NOT NULL COMMENT '0正常1申请退款', "status",//tinyint NOT NULL DEFAULT '0' COMMENT '0正常1服务完成', "service",// tinyint DEFAULT NULL COMMENT '0未服务1服务中', "createTime", // int DEFAULT NULL COMMENT '创建时间', "service_time",// int NOT NULL COMMENT '服务时间', "add_bell",// int DEFAULT NULL COMMENT '加钟时间', "createTime", // int NOT NULL, "completeTime",// int DEFAULT NULL COMMENT '完成时间', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; parent::__construct($serviceDB); } }