-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.sql
23 lines (21 loc) · 927 Bytes
/
table.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CREATE TABLE `admin` (
`id` varchar(32) NOT NULL DEFAULT '',
`phone` varchar(11) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `user` (
`id` varchar(32) NOT NULL DEFAULT '',
`name` varchar(20) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
`phone` varchar(50) NOT NULL DEFAULT '',
`photographer` tinyint(1) NOT NULL,
`certificated` tinyint(1) DEFAULT NULL,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`balance` decimal(10,0) NOT NULL,
`have_avatar` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;