You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
ttsbg-java-api/sql/ttsbg.sql

52 lines
2.1 KiB

alter table sys_user
add wechat_nick_name varchar(30) null comment '微信昵称';
alter table sys_user
add balance float null comment '账户余额';
alter table sys_user
add referrer_id bigint null comment '推荐人ID';
alter table sys_user
add constraint sys_user_sys_user_user_id_fk
foreign key (referrer_id) references sys_user (user_id);
alter table sys_user
modify user_name varchar(30) null comment '用户账号';
#
create table ttsbg.platform_address
(
id bigint auto_increment
primary key,
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
consignee varchar(10) not null comment '收货人',
phone varchar(11) not null comment '电话',
province varchar(10) not null comment '',
city varchar(10) not null comment '',
area varchar(10) not null comment '',
address varchar(50) not null comment '详细地址',
is_default tinyint(1) not null comment '是否默认',
create_by varchar(64) null,
update_by varchar(64) null,
remark varchar(500) null,
update_time datetime null,
user_id bigint null comment '关联用户',
constraint platform_address_sys_user_user_id_fk
foreign key (user_id) references ttsbg.sys_user (user_id)
)
comment '收货地址表';
create table platform_follower
(
id bigint auto_increment
primary key,
create_time datetime default CURRENT_TIMESTAMP not null,
following bigint not null comment '关注的人',
follower bigint not null comment '粉丝',
constraint follower_user_id
foreign key (follower) references sys_user (user_id),
constraint following_user_id
foreign key (following) references sys_user (user_id)
)
comment '粉丝表';