代码拉取完成,页面将自动刷新
/*==============================================================*/
/* 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;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。