ads.prisma 1.1 KB

123456789101112131415161718192021222324
  1. model Ads {
  2. id String @id @map("_id") @default(auto()) @db.ObjectId
  3. channelId String @db.ObjectId // 渠道 ID
  4. adsModule String // 广告模块 (banner/startup/轮播等)
  5. advertiser String // 广告商 (业务上限制 max 20 字符)
  6. title String // 标题 (业务上限制 max 20 字符)
  7. adsContent String? // 广告文案 (业务上限制 max 500 字符)
  8. adsCoverImg String? // 广告图片
  9. adsUrl String? // 广告链接
  10. // 有效期,使用 BigInt epoch
  11. startDt BigInt // 开始时间
  12. expiryDt BigInt // 到期时间
  13. seq Int @default(0) // 排序
  14. status Int @default(1) // 状态 0: 禁用; 1: 启用
  15. createAt BigInt @default(0) // 创建时间
  16. updateAt BigInt @default(0) // 更新时间
  17. // Relations
  18. channel Channel @relation(fields: [channelId], references: [id])
  19. @@map("ads") // collection name
  20. }