123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- create table city
- (
- city_id serial not null
- constraint city_pk
- primary key,
- city_name_zh varchar,
- city_name_en varchar,
- ord integer
- );
- alter table city
- owner to postgres;
- create table role
- (
- role_id serial not null
- constraint role_pk
- primary key,
- role_name varchar,
- create_time date,
- update_time date
- );
- alter table role
- owner to postgres;
- create table table_user
- (
- user_id serial not null
- constraint user_pk
- primary key,
- login_id varchar,
- user_name varchar,
- mobile varchar,
- email varchar,
- city_id integer,
- status integer,
- remark varchar,
- create_time date,
- update_time date
- );
- alter table table_user
- owner to postgres;
- create table user_role
- (
- id serial not null
- constraint user_role_pk
- primary key,
- user_id integer,
- role_id integer,
- create_time date,
- update_time date
- );
- alter table user_role
- owner to postgres;
- create table table2_user
- (
- login_id serial not null
- constraint table2_user_pk
- primary key,
- login_name varchar,
- user_name varchar,
- phone varchar,
- email varchar,
- province varchar,
- city varchar,
- county varchar,
- tsfx_per integer,
- tsys_per integer,
- tsdp_per integer,
- tsgdlz_per integer,
- ceate_time date,
- update_time date
- );
- comment on column table2_user.login_id is '主键自增';
- comment on column table2_user.login_name is '登录用户名';
- comment on column table2_user.user_name is '用户姓名';
- comment on column table2_user.phone is '手机号码';
- comment on column table2_user.email is '邮箱';
- comment on column table2_user.province is '归属省份';
- comment on column table2_user.city is '归属地市';
- comment on column table2_user.county is '归属区县';
- comment on column table2_user.tsfx_per is ' 投诉工单分析权限 0,1,2 0无权限 1地市级 2省级
- ';
- comment on column table2_user.tsys_per is '投诉预测权限 0,1,2 0无权限 1地市级 2省级
- ';
- comment on column table2_user.tsdp_per is '是否具备投诉大屏权限 0,1,2 0无权限 1地市级 2省级
- ';
- comment on column table2_user.tsgdlz_per is '是否投诉工单流转流程权限 0,1 0否 1有
- ';
- comment on column table2_user.ceate_time is '用户创建时间';
- comment on column table2_user.update_time is '用户修改时间';
- alter table table2_user
- owner to postgres;
- create table role_middle
- (
- role_middle_id serial not null
- constraint role_middle_pk
- primary key,
- user_id integer,
- role_id integer
- );
- alter table role_middle
- owner to postgres;
|