Made a start on the VoteEngine !wip

This commit is contained in:
Jamie Rees 2018-04-04 13:48:40 +01:00
commit 8b9c375628
5 changed files with 125 additions and 0 deletions

View file

@ -25,6 +25,7 @@ namespace Ombi.Store.Context
DbSet<TEntity> Set<TEntity>() where TEntity : class;
DbSet<NotificationTemplates> NotificationTemplates { get; set; }
DbSet<ApplicationConfiguration> ApplicationConfigurations { get; set; }
DbSet<Votes> Votes { get; set; }
void Seed();
DbSet<Audit> Audit { get; set; }
DbSet<MovieRequests> MovieRequests { get; set; }

View file

@ -39,6 +39,7 @@ namespace Ombi.Store.Context
public DbSet<IssueComments> IssueComments { get; set; }
public DbSet<RequestLog> RequestLogs { get; set; }
public DbSet<RecentlyAddedLog> RecentlyAddedLogs { get; set; }
public DbSet<Votes> Votes { get; set; }
public DbSet<Audit> Audit { get; set; }

View file

@ -0,0 +1,25 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Ombi.Store.Entities
{
[Table("Votes")]
public class Votes : Entity
{
public int RequestId { get; set; }
public VoteType VoteType { get; set; }
public RequestType RequestType { get; set; }
public string UserId { get; set; }
public DateTime Date { get; set; }
public bool Deleted { get; set; }
[ForeignKey(nameof(UserId))]
public OmbiUser User { get; set; }
}
public enum VoteType
{
Upvote = 0,
Downvote = 1
}
}