Flower Story - Database
users
| column |
type |
isnull |
description |
| uid |
unique int |
no |
|
| id |
text |
no |
用户 id |
| password |
text |
no |
加盐密码 1 |
| level |
integer |
no |
用户级别 2 |
| regdate |
numeric |
no |
注册日期 |
| activedate |
numeric |
|
最后活跃日期 |
| name |
text |
no |
用户名称 |
| email |
text |
|
邮箱 |
| mobile |
text |
|
联系电话 |
- 密码存储为
sha256(password + uid + salt)
- 级别暂定如下
- -1: disabled
- 0: user
- 99: admin
categories
| column |
type |
isnull |
description |
| cid |
unique int |
no |
|
| name |
text |
no |
花草种类名称 |
flowers
| column |
type |
isnull |
description |
| fid |
unique int |
no |
|
| categoryid |
integer |
no |
种类 id |
| name |
text |
no |
花草名称 |
| datebuy |
numeric |
no |
购买时间 |
| cost |
real |
|
金额 |
| purchase |
text |
|
购入渠道 |
| photo |
blob |
|
靓照 3 |
- 若数据为
NULL,则读取 /assets/$uid/photos/$fid.jpg 显示为购买时的照片
events
| column |
type |
isnull |
description |
| eid |
unique int |
no |
|
| name |
text |
|
事件名称 4 |
| unique |
integer |
|
是否唯一 5 |
- 事件名称,如购买、出生、换盆、浇水、施肥、发芽、开花、落叶、修剪、生病、死亡、出售等等
- 事件是否唯一,如购买、出生、死亡、出售这些事件具有唯一性
records
| column |
type |
isnull |
description |
| rid |
unique int |
no |
|
| eid |
integer |
no |
事件 id |
| date |
numeric |
no |
事件发生日期 |
| byuid |
integer |
|
操作人 uid |
| byname |
text |
|
操作人 6 |
| photo |
blob |
|
事件照片 7 |
- 操作人名称,不是必须为系统内的人员
- 若数据为
NULL,则读取 /assets/$uid/photos/rid/*.jpg 显示为该事件关联的照片