datasource db {
    provider = "sqlite"
    url      = "file://${env(\"PRISMA_DATABASE_PATH\")}"
}

generator kysely {
    provider = "prisma-kysely"

    // Optionally provide a destination directory for the generated file
    // and a filename of your choice
    output       = "./src/db/schema"
    fileName     = "types.ts"
    // Optionally generate runtime enums to a separate file
    enumFileName = "enums.ts"
}

model Channel {
    uuid                 String    @id
    createdAt            DateTime?
    updatedAt            DateTime?
    disableFillerOverlay Boolean   @default(false)
    duration             Int
    fillerRepeatCooldown Int?
    groupTitle           String?
    guideFlexTitle       String?
    guideMinimumDuration Int
    /// @kyselyType( import('./base.ts').ChannelIcon )
    icon                 Json
    name                 String
    number               Int       @unique
    /// @kyselyType( import('./base.ts).ChannelOfflineSettings )
    offline              Json      @default("{\"mode\":\"clip\"}")
    startTime            Int
    stealth              Boolean   @default(false)
    streamMode           String
    transcoding
    transcodeConfigId
    watermark
}
