Restored to '44d6f571a5a2b8bce0fd4e8a9eae76204284885b'

Replit-Restored-To: 44d6f571a5
This commit is contained in:
sebastjanartic
2025-08-28 17:43:16 +00:00
parent 8fe4a6f7f6
commit 42883d8409
12 changed files with 85 additions and 469 deletions
+10 -2
View File
@@ -4,18 +4,26 @@ import { createInsertSchema } from "drizzle-zod";
import { z } from "zod";
export const videos = pgTable("videos", {
id: varchar("id").primaryKey(),
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
title: text("title").notNull(),
description: text("description").default("").notNull(),
thumbnailUrl: text("thumbnail_url").notNull(),
customThumbnailUrl: text("custom_thumbnail_url"),
videoUrl: text("video_url").notNull(),
videoUrlMp4: text("video_url_mp4"),
videoUrlIframe: text("video_url_iframe"),
duration: integer("duration").notNull(), // in seconds
views: integer("views").notNull().default(0),
category: text("category").default("").notNull(),
tags: text("tags").array().default([]).notNull(),
isPublic: boolean("is_public").default(true).notNull(),
uploadStatus: text("upload_status").default("completed").notNull(), // pending, processing, completed, failed
uploadStatus: text("upload_status").default("pending").notNull(), // pending, processing, completed, failed
originalFileName: text("original_file_name"),
fileSize: integer("file_size"), // in bytes
bitrate: integer("bitrate"), // in kbps
resolution: text("resolution"), // e.g., "1920x1080"
format: text("format"), // e.g., "mp4", "avi", "mov"
encoding: text("encoding"), // e.g., "h264", "h265"
createdAt: timestamp("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
updatedAt: timestamp("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`),
});