base.sql
2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
alter table base_data_customer modify column mnemonic_code varchar(20) null;
-- 厂房信息
create table if not exists base_data_workshop (
id varchar(32) primary key comment 'ID',
code varchar(20) not null comment '厂房编号',
name varchar(50) not null comment '厂房名称',
type varchar(20) not null comment '厂房类型',
description varchar(100) comment '描述',
create_by_id varchar(32) not null comment '创建人ID',
create_by varchar(20) not null comment '创建人',
update_by_id varchar(32) not null comment '更新人ID',
update_by varchar(20) not null comment '更新人',
create_time datetime default now() comment '创建时间',
update_time datetime default now() comment '更新时间'
);
-- 办事处/科办
create table if not exists base_data_office (
id varchar(32) primary key comment 'ID',
code varchar(20) not null comment '编号',
name varchar(50) not null comment '名称',
description varchar(100) comment '描述',
create_by_id varchar(32) not null comment '创建人ID',
create_by varchar(20) not null comment '创建人',
update_by_id varchar(32) not null comment '更新人ID',
update_by varchar(20) not null comment '更新人',
create_time datetime default now() comment '创建时间',
update_time datetime default now() comment '更新时间'
);
-- 类型数据
create table if not exists base_data_type (
id varchar(32) primary key comment 'ID',
code varchar(20) not null comment '编号',
name varchar(50) not null comment '名称',
description varchar(100) comment '描述',
type varchar(20) not null comment '类型:客户(CUSTOMER)',
create_by_id varchar(32) not null comment '创建人ID',
create_by varchar(20) not null comment '创建人',
update_by_id varchar(32) not null comment '更新人ID',
update_by varchar(20) not null comment '更新人',
create_time datetime default now() comment '创建时间',
update_time datetime default now() comment '更新时间'
);
-- 产品品种
create table if not exists base_data_product_variety (
id varchar(32) primary key comment 'ID',
code varchar(20) not null comment '编号',
name varchar(50) not null comment '名称',
description varchar(100) comment '描述',
create_by_id varchar(32) not null comment '创建人ID',
create_by varchar(20) not null comment '创建人',
update_by_id varchar(32) not null comment '更新人ID',
update_by varchar(20) not null comment '更新人',
create_time datetime default now() comment '创建时间',
update_time datetime default now() comment '更新时间'
);