Change User Model and Add poll model, port !poll but ended up disabling it

This commit is contained in:
runebaas 2018-05-19 10:49:01 +02:00
parent 74793c8ef7
commit 9354e5f83e
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
13 changed files with 138 additions and 92 deletions

View file

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Geekbot.net.Database.Models
{
public class PollModel
{
[Key]
public int Id { get; set; }
[Required]
public long GuildId { get; set; }
[Required]
public long ChannelId { get; set; }
public string Question { get; set; }
public long Creator { get; set; }
public long MessageId { get; set; }
public List<PollQuestionModel> Options { get; set; }
public bool IsFinshed { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace Geekbot.net.Database.Models
{
public class PollQuestionModel
{
[Key]
public int Id { get; set; }
public int OptionId { get; set; }
public string OptionText { get; set; }
public int Votes { get; set; }
}
}

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Geekbot.net.Database.Models
@ -24,6 +25,6 @@ namespace Geekbot.net.Database.Models
public DateTimeOffset Joined { get; set; }
public string[] UsedNames { get; set; }
public List<UserUsedNamesModel> UsedNames { get; set; }
}
}

View file

@ -1,15 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Geekbot.net.Database.Models
{
public class UserSettingsModel
{
[Key]
public int Id { get; set; }
[Required]
public long UserId { get; set; }
// stuff to be added in the future
}
}

View file

@ -0,0 +1,15 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Geekbot.net.Database.Models
{
public class UserUsedNamesModel
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public DateTimeOffset FirstSeen { get; set; }
}
}