Added tags model
This commit is contained in:
parent
b921410515
commit
d996f7a2cb
@ -10,6 +10,7 @@ namespace YTManager
|
|||||||
{
|
{
|
||||||
public DbSet<Models.Channel> Channels { get; set; }
|
public DbSet<Models.Channel> Channels { get; set; }
|
||||||
public DbSet<Models.Video> Videos { get; set; }
|
public DbSet<Models.Video> Videos { get; set; }
|
||||||
|
public DbSet<Models.Tag> Tags { get; set; }
|
||||||
|
|
||||||
public MediaDB(DbContextOptions<MediaDB> options) :base(options){ }
|
public MediaDB(DbContextOptions<MediaDB> options) :base(options){ }
|
||||||
|
|
||||||
|
25
YTManager/Models/Tag.cs
Normal file
25
YTManager/Models/Tag.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace YTManager.Models
|
||||||
|
{
|
||||||
|
public class Tag
|
||||||
|
{
|
||||||
|
// Uniquie ID for this media type
|
||||||
|
[Key]
|
||||||
|
public long key { get; set; }
|
||||||
|
|
||||||
|
// Tag Name.
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
// Videos this tag applies to.
|
||||||
|
public List<Video> Videos { get; set; }
|
||||||
|
|
||||||
|
// Channels this tag applies to.
|
||||||
|
public List<Channel> Channels { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user