create table sys_user
(
    dept_id      bigint,
    role_id      bigint,
    username     varchar(20) not null,
    password     varchar     not null,
    phone        varchar(11),
    email        varchar(40),
    name         varchar(255),
    avatar       varchar(255),
    address      varchar(255),
    create_by    varchar(255),
    update_by    varchar(255),
    create_time  timestamp(6),
    update_time  timestamp(6),
    remark       varchar(255),
    enable_state varchar(5),
    id           bigint      not null
        primary key
);

comment
on column sys_user.dept_id is '部门id';

comment
on column sys_user.role_id is '角色id';

comment
on column sys_user.username is '用户名';

comment
on column sys_user.password is '密码';

comment
on column sys_user.phone is '手机号码';

comment
on column sys_user.email is '电子邮箱';

comment
on column sys_user.name is '昵称';

comment
on column sys_user.avatar is '头像';

comment
on column sys_user.address is '地址';

comment
on column sys_user.create_by is '创建者';

comment
on column sys_user.update_by is '更新者';

comment
on column sys_user.enable_state is '状态';

alter table sys_user
    owner to gitea;

_user
.
enable_state
is '状态';

alter table sys_user
    owner to gitea;

