create table sys_user_notice
(
    id        bigint default nextval('sys_user_message_id_seq'::regclass) not null
        constraint sys_user_notice_pk
            primary key,
    user_id   bigint                                                      not null,
    notice_id bigint                                                      not null,
    is_read   boolean                                                     not null,
    read_time timestamp
);

comment
on table sys_user_notice is '用户消息';

comment
on column sys_user_notice.id is '主键';

comment
on column sys_user_notice.user_id is '用户';

comment
on column sys_user_notice.notice_id is '消息';

comment
on column sys_user_notice.is_read is '是否已读';

comment
on column sys_user_notice.read_time is '阅读时间';

alter table sys_user_notice
    owner to gitea;

