Added tags model

This commit is contained in:
hak8or 2018-02-18 14:38:28 -05:00
parent b921410515
commit d996f7a2cb
2 changed files with 26 additions and 0 deletions

View File

@ -10,6 +10,7 @@ namespace YTManager
{
public DbSet<Models.Channel> Channels { get; set; }
public DbSet<Models.Video> Videos { get; set; }
public DbSet<Models.Tag> Tags { get; set; }
public MediaDB(DbContextOptions<MediaDB> options) :base(options){ }

25
YTManager/Models/Tag.cs Normal file
View 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; }
}
}