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