记得上下班打卡 | git大法好,push需谨慎

Commit 8dafce42 authored by 张国柄's avatar 张国柄

+GOBLIN:SQL;

parent 04e449f7
USE dev_ln_scene; use dev_ln_scene;
# -- >>------------------------------------------------------------------------------------
alter table adam_real_name add node tinyint default 2 not null comment '认证节点[2-二要素|3-三要素]';
# alter table goblin_goods add spu_type tinyint default 0 null comment '商品类型[0-常规|1-数字藏品]' after spu_no;
# alter table goblin_goods add notice varchar(256) null comment '注意事项' after details;
# alter table goblin_goods add has_box tinyint default 0 null comment '存在盲盒[0-否|1-是]' after spu_appear;
alter table goblin_goods_sku add sku_type tinyint default 0 null comment '商品类型[0-常规|1-数字藏品]' after sku_no;
alter table goblin_goods_sku add details text null comment '详情' after details;
alter table goblin_goods_sku add sku_watch varchar(256) null comment '展示文件URL' after sku_isbn;
alter table goblin_goods_sku add material_original_url varchar(256) null comment '素材原始文件URL' after sku_watch;
alter table goblin_goods_sku add gift_stock int null comment '兑换库存' after sku_stock;
alter table goblin_goods_sku add shelves_handle char default '1' comment '上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]' after store_id;
alter table goblin_goods_sku add shelves_time datetime null comment '预约上架时间[上架处理方式为3-预约定时上架时需要指定]' after shelves_handle;
alter table goblin_goods_sku add sale_start_at datetime null comment '开售时间' after shelves_time;
alter table goblin_goods_sku add sale_stop_at datetime null comment '停售时间' after sale_start_at;
alter table goblin_goods_sku add unbox tinyint default 0 null comment '是否盲盒[0-否|1-是]' after sku_appear;
alter table goblin_goods_sku add hit_ratio varchar(10) null comment '盲盒命中率' after unbox;
alter table goblin_goods_sku add opening_time datetime null comment '盲盒开启时间' after hit_ratio;
alter table goblin_goods_sku add opening_limit int default 0 comment '盲盒开启时限[单位秒]' after opening_time;
alter table goblin_goods_sku add route_type varchar(20) null comment 'NFT路由' after opening_limit;
alter table goblin_goods_sku add material_access_url varchar(256) null comment 'NFT素材访问URL' after route_type;
alter table goblin_goods_sku add series_id varchar(256) null comment 'NFT系列ID' after material_access_url;
# -- >>------------------------------------------------------------------------------------
drop table if exists goblin_digital_artwork;
create table goblin_digital_artwork
(
mid bigint auto_increment primary key,
order_id varchar(64) not null comment '藏品订单号',
uid varchar(64) not null comment '用户UID',
sku_id varchar(64) not null comment '单品ID',
opening_at datetime null comment '盲盒开启时间',
state char default '0' comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]',
edition_sn int null comment '序列号',
nft_id varchar(256) null comment '发行标识',
release_at datetime null comment '发行时间',
trading_at datetime null comment '交易时间',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
created_at datetime not null,
updated_at datetime null,
deleted_at datetime null,
comment varchar(500)
) engine = InnoDB comment '数字藏品信息';
# -- >>------------------------------------------------------------------------------------
drop table if exists goblin_goods_sku_excode;
create table goblin_goods_sku_excode
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '单品ID',
num int comment '生成数量',
type tinyint comment '兑换码类型[0-普通商品|1-数字藏品|2-数字藏品盲盒]',
code varchar(64) not null comment '单品兑换码',
state tinyint default 0 comment '兑换码状态[0-未兑换|1-已兑换|10-用作生成模版]',
start_at datetime null comment '开始时间',
stop_at datetime null comment '截止时间',
redeem_uid varchar(64) comment '兑换用户UID',
redeem_for varchar(128) comment '兑换内容描述',
redeem_at datetime comment '兑换时间',
operator varchar(64),
created_at datetime not null,
updated_at datetime null,
deleted_at datetime null,
comment varchar(500)
) engine = InnoDB comment '单品兑换码';
create index idx_ggse_sku_id on goblin_goods_sku_excode (sku_id);
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
DROP TABLE IF EXISTS goblin_nft_order; DROP TABLE IF EXISTS goblin_nft_order;
...@@ -55,7 +129,7 @@ CREATE TABLE goblin_nft_order ...@@ -55,7 +129,7 @@ CREATE TABLE goblin_nft_order
DEFAULT CHARSET utf8mb4 DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT 'NFT订单表'; ROW_FORMAT = DYNAMIC COMMENT 'NFT订单表';
# -- >>------------------------------------------------------------------------------------
DROP TABLE IF EXISTS goblin_nft_order_refund; DROP TABLE IF EXISTS goblin_nft_order_refund;
CREATE TABLE goblin_nft_order_refund CREATE TABLE goblin_nft_order_refund
( (
...@@ -82,4 +156,7 @@ CREATE TABLE goblin_nft_order_refund ...@@ -82,4 +156,7 @@ CREATE TABLE goblin_nft_order_refund
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4 DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT 'NFT订单退款表'; ROW_FORMAT = DYNAMIC COMMENT 'NFT订单退款表';
\ No newline at end of file # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment