| 1234567891011121314151617181920212223242526272829303132333435 |
- // enums
- enum ParamSide {
- client // 客户端
- server // 后端
- }
- enum ParamDataType {
- url
- number
- time // store as unix seconds (string/int in API; here we keep Int)
- switch // 0/1
- text
- }
- model SystemParam {
- // UI numeric ID (you’ll set this in service: last+1)
- id Int @id @map("_id") @db.Int
- // 业务字段
- side ParamSide // 参数类型: client/server
- type ParamDataType @map("type") // 数据类型
- name String
- value String // <= 500 chars (enforce in service/DTO)
- remark String? // <= 500
- createAt Int @map("create_at")
- updateAt Int @map("update_at")
- // indexes
- @@index([updateAt(sort: Desc)])
- @@index([side, type])
- @@unique([side, name]) // avoid duplicate key names under same side
- @@map("systemParams")
- }
|