mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Made a start on the VoteEngine !wip
This commit is contained in:
parent
b8739142ca
commit
8b9c375628
5 changed files with 125 additions and 0 deletions
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
25
src/Ombi.Store/Entities/Votes.cs
Normal file
25
src/Ombi.Store/Entities/Votes.cs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue