2024-12-03 19:33:43 +00:00
|
|
|
import type {
|
|
|
|
|
Generated,
|
|
|
|
|
Insertable,
|
|
|
|
|
Selectable,
|
|
|
|
|
Updateable,
|
|
|
|
|
} from 'kysely'
|
|
|
|
|
|
|
|
|
|
export interface Database {
|
|
|
|
|
videos: VideosTable
|
|
|
|
|
reports: ReportsTable
|
2026-04-04 10:55:20 +00:00
|
|
|
files: FilesTable
|
2024-12-03 19:33:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface VideosTable {
|
|
|
|
|
uuid: Generated<string>
|
|
|
|
|
id: string
|
|
|
|
|
title: string
|
|
|
|
|
description: string
|
|
|
|
|
thumbnail: string
|
|
|
|
|
source: string
|
|
|
|
|
published: string
|
|
|
|
|
archived: string
|
|
|
|
|
channel: string
|
|
|
|
|
channelId: string
|
|
|
|
|
channelVerified: boolean
|
|
|
|
|
channelAvatar: string
|
|
|
|
|
playlist?: string | null
|
|
|
|
|
disabled: boolean
|
2026-02-20 23:45:58 +00:00
|
|
|
hasBeenReported: boolean,
|
2026-04-02 20:45:58 +00:00
|
|
|
deletion_stage: 'pending_delete' | 'soft_delete' | 'cold_storage' | 'deleted' | null
|
2024-12-03 19:33:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type Video = Selectable<VideosTable>
|
|
|
|
|
export type NewVideo = Insertable<VideosTable>
|
|
|
|
|
export type UpdateVideo = Updateable<VideosTable>
|
|
|
|
|
|
|
|
|
|
export interface ReportsTable {
|
|
|
|
|
uuid: Generated<string>
|
|
|
|
|
target: string
|
|
|
|
|
title: string
|
|
|
|
|
details: string
|
|
|
|
|
date: Date
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type Report = Selectable<ReportsTable>
|
|
|
|
|
export type NewReport = Insertable<ReportsTable>
|
2026-04-04 10:55:20 +00:00
|
|
|
export type UpdateReport = Updateable<ReportsTable>
|
|
|
|
|
|
|
|
|
|
export interface FilesTable {
|
|
|
|
|
uuid: Generated<string>
|
|
|
|
|
videoId: string
|
|
|
|
|
filename: string
|
|
|
|
|
hash: string
|
|
|
|
|
hash_algorithm: string
|
|
|
|
|
size_bytes: number
|
|
|
|
|
duration_seconds: number
|
|
|
|
|
video_codec: string
|
|
|
|
|
audio_codec: string
|
|
|
|
|
resolution: string
|
|
|
|
|
fps: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type File = Selectable<FilesTable>
|
|
|
|
|
export type NewFile = Insertable<FilesTable>
|