数据上链的文件上传系统

WeBase
上链的数据

user_Name String

file_Name String

file_Size Float

file_Type String

file_Hash String

create_Time Date

update_Time Date

user表

ID

user_Name String

user_Account String

user_Password String

user_Role integer

三字段

create table user
(
    ID            int auto_increment comment 'ID'
        primary key,
    user_Name     char(15)                    not null comment '名称',
    user_Account  char(10)                    not null comment '账号',
    user_Password char(20)   default '123456' null comment '密码',
    user_Role     tinyint(1) default 1        not null comment '角色'
);

file表

ID String

user_Id String

file_Name String

file_Size Float

file_Type String

file_Hash String

三字段

create table file
(
    ID          int auto_increment comment 'ID'
        primary key,
    user_ID     int                       null comment 'user_ID',
    file_Name   char(20)                  not null comment '文件名称',
    file_Size   float                     not null comment '文件大小',
    file_Type   char(10)   default '未知' null invisible comment '文件类型',
    file_Hash   char                      not null comment 'Hash',
    create_Time datetime                  not null comment '创建时间',
    update_Time datetime                  not null comment '更新时间',
    is_Delete   tinyint(1) default 1      null comment '是否删除',
    constraint file_user_ID_fk
        foreign key (user_ID) references user (ID)
);

链表

看返回什么,到时候说

最后修改:2023 年 12 月 04 日
如果觉得我的文章对你有用,请随意赞赏