mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-12 21:15:42 -04:00
initial push from external dev branches
This commit is contained in:
15
server/src/models/PlaylistChannel.ts
Normal file
15
server/src/models/PlaylistChannel.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Schema, model } from 'mongoose';
|
||||
|
||||
const PlaylistChannelSchema = new Schema(
|
||||
{
|
||||
playlistId: { type: String, required: true, index: true },
|
||||
channelId: { type: String, required: true, index: true },
|
||||
order: { type: Number, required: true },
|
||||
},
|
||||
{ versionKey: false },
|
||||
);
|
||||
|
||||
PlaylistChannelSchema.index({ playlistId: 1, channelId: 1 }, { unique: true });
|
||||
PlaylistChannelSchema.index({ playlistId: 1, order: 1 });
|
||||
|
||||
export const PlaylistChannel = model('PlaylistChannel', PlaylistChannelSchema);
|
||||
Reference in New Issue
Block a user