2 Star 0 Fork 0

LeftJson / 猎茶相关文件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
liecha.sql 8.85 KB
一键复制 编辑 原始数据 按行查看 历史
张海航 提交于 2018-08-07 20:16 . 20180807
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/8/7 星期二 下午 7:53:17 */
/*==============================================================*/
drop table if exists lc_addr;
drop table if exists lc_commodity;
drop table if exists lc_commodity_type;
drop table if exists lc_conllect;
drop table if exists lc_invoice;
drop table if exists lc_order;
drop table if exists lc_order_deail;
drop table if exists lc_photo;
drop table if exists lc_products;
drop table if exists lc_refund;
drop table if exists lc_user;
/*==============================================================*/
/* Table: lc_addr */
/*==============================================================*/
create table lc_addr
(
id varchar(32) not null,
lc_userid varchar(32),
consignee varchar(50),
contact_number varchar(11),
area varchar(255),
addr_info varchar(255),
userid varchar(32),
postal_code varchar(6),
primary key (id)
);
/*==============================================================*/
/* Table: lc_commodity */
/*==============================================================*/
create table lc_commodity
(
id varchar(32) not null,
lc_userid varchar(32),
lc__id varchar(32),
name varchar(50),
"describe" varchar(255),
price decimal,
specifications varchar(50),
collect_count int,
commodity_type int,
create_by varchar(50),
create_time datetime,
modify_time datetime,
modify_by varchar(50),
isdel int,
commodity_id varchar(32),
primary key (id)
);
/*==============================================================*/
/* Table: lc_commodity_type */
/*==============================================================*/
create table lc_commodity_type
(
id varchar(32) not null,
name varchar(50),
img varchar(255),
primary key (id)
);
/*==============================================================*/
/* Table: lc_conllect */
/*==============================================================*/
create table lc_conllect
(
id varchar(32) not null,
lc_userid varchar(32),
lc__id varchar(32),
primary key (id)
);
/*==============================================================*/
/* Table: lc_invoice */
/*==============================================================*/
create table lc_invoice
(
id varchar(32) not null,
lc_userid varchar(32),
type int,
fp_rasied int,
unit_name varchar(50),
recognition_number varchar(50),
tickek_tel varchar(11),
tickek_info varchar(50),
invoice_info varchar(50),
commodity_info varchar(50),
commodity_type varchar(50),
create_by varchar(50),
create_time datetime,
modify_date varchar(32),
modify_time datetime,
isdel int,
primary key (id)
);
/*==============================================================*/
/* Table: lc_order */
/*==============================================================*/
create table lc_order
(
id varchar(32) not null,
lc__id varchar(32),
shop_id varchar(32),
order_type int,
deliver_date datetime,
finish_date datetime,
order_status int,
express_price decimal,
create_by varchar(50),
create_date datetime,
modify_by varchar(50),
modify_date datetime,
isdel int,
primary key (id)
);
/*==============================================================*/
/* Table: lc_order_deail */
/*==============================================================*/
create table lc_order_deail
(
id varchar(32) not null,
order_no varchar(32),
commodity_no varchar(32),
order_type int,
commodity_num int,
commodity_price decimal,
create_by varchar(50),
create_date datetime,
user_id varchar(32),
pay_type int,
order_rate varchar(255),
primary key (id)
);
/*==============================================================*/
/* Table: lc_photo */
/*==============================================================*/
create table lc_photo
(
id varchar(32) not null,
lc__id varchar(32),
lc__id2 varchar(32),
img_path varchar(255),
isdel int,
img_h int,
img_w int,
order_by int,
primary key (id)
);
/*==============================================================*/
/* Table: lc_products */
/*==============================================================*/
create table lc_products
(
id varchar(32) not null,
lc_userid varchar(32),
name varchar(32),
stock int,
salesvolume int,
specifications varchar(32),
rase varchar(32),
primary key (id)
);
/*==============================================================*/
/* Table: lc_refund */
/*==============================================================*/
create table lc_refund
(
id varchar(32) not null,
lc__id varchar(32),
order_no varchar(32),
pay_type varchar(32),
refund_date varchar(32),
refund_rase varchar(255),
refund_resion int,
primary key (id)
);
/*==============================================================*/
/* Table: lc_user */
/*==============================================================*/
create table lc_user
(
lc_userid varchar(32) not null,
real_name varchar(50),
phone varchar(11),
sex int,
password varchar(50),
is_manager int,
before_time datetime,
create_time datetime,
create_by datetime,
modify_by varchar(50),
isdel int,
primary key (lc_userid)
);
alter table lc_user comment '用户表';
alter table lc_addr add constraint FK_用户地址一对多 foreign key (lc_userid)
references lc_user (lc_userid) on delete restrict on update restrict;
alter table lc_commodity add constraint FK_商品一对多商品分类 foreign key (lc__id)
references lc_commodity_type (id) on delete restrict on update restrict;
alter table lc_commodity add constraint FK_用户商品一对多 foreign key (lc_userid)
references lc_user (lc_userid) on delete restrict on update restrict;
alter table lc_conllect add constraint FK_Reference_11 foreign key (lc__id)
references lc_commodity (id) on delete restrict on update restrict;
alter table lc_conllect add constraint FK_Reference_9 foreign key (lc_userid)
references lc_user (lc_userid) on delete restrict on update restrict;
alter table lc_invoice add constraint FK_用户一对多发票 foreign key (lc_userid)
references lc_user (lc_userid) on delete restrict on update restrict;
alter table lc_order add constraint FK_一个商品对应多个订单 foreign key (lc__id)
references lc_commodity (id) on delete restrict on update restrict;
alter table lc_photo add constraint FK_Reference_4 foreign key (lc__id)
references lc_commodity (id) on delete restrict on update restrict;
alter table lc_photo add constraint FK_Reference_6 foreign key (lc__id2)
references lc_refund (id) on delete restrict on update restrict;
alter table lc_products add constraint FK_用户一对应多试用品 foreign key (lc_userid)
references lc_user (lc_userid) on delete restrict on update restrict;
alter table lc_refund add constraint FK_退款商品 foreign key (lc__id)
references lc_commodity (id) on delete restrict on update restrict;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/LeftJson/left_liecha.git
git@gitee.com:LeftJson/left_liecha.git
LeftJson
left_liecha
猎茶相关文件
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891