Polls persist restarts now.

This commit is contained in:
Master Kwoth
2017-10-27 18:39:56 +02:00
parent 2fbb80a2a2
commit 29f97f3732
16 changed files with 2461 additions and 168 deletions

View File

@ -1,13 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Core.Services.Database.Models
namespace NadekoBot.Core.Services.Database.Models
{
public class PollVote
public class PollVote : DbEntity
{
public ulong UserId { get; set; }
public int VoteIndex { get; set; }
public override int GetHashCode()
{
return UserId.GetHashCode();
}
public override bool Equals(object obj)
{
return obj is PollVote p
? p.UserId == UserId
: false;
}
}
}