Let users upload videos, tag them with one or more entries, and watch them from a new Discovery Videos page. Backend: - Add Video and VideoEntry models and relations - Add video controller and /video routes - Add video thumbnail generation service (ffmpeg-static) - Add video upload storage location and config Frontend: - Add DiscoveryVideosPage with sidebar link and route - Add AddVideoDialog, VideoDropzone, EntryMultiSelect, VideoCard and VideoPlayerDialog components - Add discoveryVideos API client and useDiscoveryVideos hook - Add format helpers, video types and normalizers - Add skeleton for the page Docs: - Document the feature in docs-vault
18 lines
469 B
JavaScript
18 lines
469 B
JavaScript
const { DataTypes } = require("sequelize");
|
|
const sequelize = require("../config/database");
|
|
|
|
// Junction table linking discovery videos to library entries (many-to-many)
|
|
const VideoEntry = sequelize.define(
|
|
"VideoEntry",
|
|
{
|
|
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
|
video_id: { type: DataTypes.INTEGER },
|
|
entry_id: { type: DataTypes.INTEGER },
|
|
},
|
|
{
|
|
tableName: "video_entries",
|
|
},
|
|
);
|
|
|
|
module.exports = VideoEntry;
|