category.prisma 870 B

12345678910111213141516171819202122
  1. model Category {
  2. id String @id @map("_id") @default(auto()) @db.ObjectId
  3. name String // 分类名称
  4. subtitle String? // 副标题
  5. seq Int @default(0) // 排序
  6. status Int @default(1) // 状态 0: 禁用; 1: 启用
  7. // epoch seconds stored as BigInt
  8. createAt BigInt @default(0) // 创建时间 (秒)
  9. updateAt BigInt @default(0) // 更新时间 (秒)
  10. // Legacy/optional: denormalized tag refs (to be discussed)
  11. tags Json? // Array of { id, name }
  12. // Search optimization / browsing helper (keep)
  13. tagNames String[] // Array of tag names
  14. @@index([status])
  15. @@index([seq])
  16. @@index([tagNames])
  17. @@map("category")
  18. }