美文网首页
fastadmin 测试表参考(用于一键生成)

fastadmin 测试表参考(用于一键生成)

作者: JUN888 | 来源:发表于2021-04-17 02:59 被阅读0次
    CREATE TABLE `fa_test` (
    `id` INT ( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `admin_id` INT ( 10 ) NOT NULL DEFAULT '0' COMMENT '管理员ID',
    `category_id` INT ( 10 ) UNSIGNED NOT NULL DEFAULT '0' COMMENT '分类ID(单选)',
    `category_ids` VARCHAR ( 100 ) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类ID(多选)',
    `week` enum ( 'monday', 'tuesday', 'wednesday' ) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
    `flag` 
    SET ( 'hot', 'index', 'recommend' ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
    `genderdata` enum ( 'male', 'female' ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
    `hobbydata` 
    SET ( 'music', 'reading', 'swimming' ) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '爱好(多选):music=音乐,reading=读书,swimming=游泳',
    `title` VARCHAR ( 50 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '标题',
    `content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内容',
    `image` VARCHAR ( 100 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图片',
    `images` VARCHAR ( 1500 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图片组',
    `attachfile` VARCHAR ( 100 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '附件',
    `keywords` VARCHAR ( 100 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '关键字',
    `description` VARCHAR ( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '描述',
    `city` VARCHAR ( 100 ) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '省市',
    `json` VARCHAR ( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '配置:key=名称,value=值',
    `price` FLOAT ( 10, 2 ) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '价格',
    `views` INT ( 10 ) UNSIGNED NOT NULL DEFAULT '0' COMMENT '点击',
    `startdate` date DEFAULT NULL COMMENT '开始日期',
    `activitytime` datetime DEFAULT NULL COMMENT '活动时间(datetime)',
    `year` YEAR ( 4 ) DEFAULT NULL COMMENT '年',
    `times` time DEFAULT NULL COMMENT '时间',
    `refreshtime` INT ( 10 ) DEFAULT NULL COMMENT '刷新时间(int)',
    `createtime` INT ( 10 ) DEFAULT NULL COMMENT '创建时间',
    `updatetime` INT ( 10 ) DEFAULT NULL COMMENT '更新时间',
    `deletetime` INT ( 10 ) DEFAULT NULL COMMENT '删除时间',
    `weigh` INT ( 10 ) NOT NULL DEFAULT '0' COMMENT '权重',
    `switch` TINYINT ( 1 ) NOT NULL DEFAULT '0' COMMENT '开关',
    `status` enum ( 'normal', 'hidden' ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
    `state` enum ( '0', '1', '2' ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '状态值:0=禁用,1=正常,2=推荐',
    PRIMARY KEY ( `id` ) USING BTREE 
    ) ENGINE = INNODB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC COMMENT = '测试表';
    

    相关文章

      网友评论

          本文标题:fastadmin 测试表参考(用于一键生成)

          本文链接:https://www.haomeiwen.com/subject/notulltx.html