店滴开发者手册店滴开发者手册
首页
指南
插件
接口
智能设备
element后台
SDK
首页
指南
插件
接口
智能设备
element后台
SDK
  • 接口

    • 项目文档
    • /api/api_interface_specification.html
    • 系统安装指南
    • 表单
    • saas
    • 支付
    • 命令行
    • 生成模型类
    • 控制器
    • search
    • 操作单个状态类字段
    • 模型
    • behavior
    • 验证规则
    • 数据库配置指南
    • 字段设计要求
    • /api/db_sharding.html
    • /api/db_read_write_separation.html
    • 检查MySQL服务是否运行
    • 原生sql执行与操作
    • /api/db_transaction.html
    • 关于缓存
    • cookie
    • 用户信息获取
    • /api/event_addonsEvent.html
    • 队列
    • composer 的使用

字段设计要求

字段要求

以下字段每个数据库必须有:

字段名称字段类型
bloc_idint
store_idint
create_timedatetime
update_timedatetime

每个字段必须添加备注说明

CREATE TABLE `www_dzwztea_com`.`Untitled`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '会员卡券id',
  `bloc_id` int(11) NOT NULL COMMENT '人脸库组id',
  `store_id` int(11) NOT NULL,
  `create_time` datetime(0) NULL DEFAULT NULL,
  `update_time` datetime(0) NULL DEFAULT NULL,
  `member_id` int(11) NULL DEFAULT NULL COMMENT '会员id',
  `coupon_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '卡券名称',
  `coupon_type` smallint(6) NULL DEFAULT NULL COMMENT '卡券类型  1:代金券 2:时常卡  3:次卡 4:折扣券 5:体验券',
  `coupon_id` int(11) NULL DEFAULT NULL COMMENT '卡券id',
  `buy_time` datetime(0) NULL DEFAULT NULL COMMENT '购买时间',
  `end_time` datetime(0) NULL DEFAULT NULL COMMENT '到期时间',
  `use_time` datetime(0) NULL DEFAULT NULL COMMENT '使用时间',
  `use_num` smallint(6) NULL DEFAULT 0 COMMENT '使用次数',
  `surplus_num` smallint(6) NULL DEFAULT 0 COMMENT '剩余次数',
  `receive_type` smallint(6) NULL DEFAULT NULL COMMENT '领取方式:1.领取 2.购买 3.充值赠送',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 148 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户卡券表' ROW_FORMAT = Compact;
Prev
数据库配置指南
Next
/api/db_sharding.html