-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提交数据库设计 #1
base: main
Are you sure you want to change the base?
提交数据库设计 #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
| 字段名称 | 数据类型 | 释义 | 示例 | | ||
| :------: | :------: | :----------: | :----------: | | ||
| user_id | Integer | 用户唯一标识 | 1 | | ||
| name | varchar | 用户名称 | 张三 | | ||
| number | varchar | 用户学号 | 201931061008 | | ||
| grade | year | 用户年级 | 2019 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个用varchar就行 |
||
| pwd | varchar | 用户密码 | 123456 | | ||
|
||
|
||
|
||
图片信息: | ||
|
||
| 字段名称 | 数据类型 | 释义 | 示例 | | ||
| :------: | :------: | :----------: | :---------------------------------------------: | | ||
| photo_id | Integer | 图片唯一标识 | 1 | | ||
| name | varchar | 图片原名称 | 聚会 | | ||
| addtime | datetime | 上传时间 | 2021-5-11 12:12:12 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 日期统一用timestamp 规避一些时区引起的问题 |
||
| taketime | datetime | 拍摄时间 | 2021-5-10 12:12:12 | | ||
| size | varchar | 图片大小 | 105kb | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个存数字 单位B 由展示方去计算最终展示内容 |
||
| sizeinfo | varchar | 图片尺寸信息 | 1024*768 | | ||
| format | varchar | 图片格式 | .jpg | | ||
| url | varchar | 图片链接 | https://699pic.com/tupian-500470844.html | | ||
| status | int | 图片状态 | 1(表示公开),2(注册用户可看),3(仅自己可看) | | ||
| label | varchar | 图片标签 | 团队聚会 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 标签这个功能的实现,光这个一个字段可能不行哦,可能还需要 1-2张表 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 仔细品一下需求: 所以这里至少还需要有张标签的表,图片与标签关联关系的表 |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
然后通常还需再记录一下注册时间,最后登录时间
这里还有个注册审核的流程,所以还需要一个字段表示用户当前的状态
其次平台区分了管理员和普通用户,所以还需要一个 字段区分角色