Refactor done
This commit is contained in:
19
NadekoBot/_Models/DataModels/AnnouncementModel.cs
Normal file
19
NadekoBot/_Models/DataModels/AnnouncementModel.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
internal class Announcement : IDataModel
|
||||
{
|
||||
public long ServerId { get; set; } = 0;
|
||||
public bool Greet { get; set; } = false;
|
||||
public bool GreetPM { get; set; } = false;
|
||||
[JsonProperty("greetChannel")]
|
||||
public long GreetChannelId { get; set; } = 0;
|
||||
public string GreetText { get; set; } = "Welcome %user%!";
|
||||
public bool Bye { get; set; } = false;
|
||||
public bool ByePM { get; set; } = false;
|
||||
[JsonProperty("byeChannel")]
|
||||
public long ByeChannelId { get; set; } = 0;
|
||||
public string ByeText { get; set; } = "%user% has left the server.";
|
||||
}
|
||||
}
|
11
NadekoBot/_Models/DataModels/CommandModel.cs
Normal file
11
NadekoBot/_Models/DataModels/CommandModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class Command : IDataModel {
|
||||
public long UserId { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public long ServerId { get; set; }
|
||||
public string ServerName { get; set; }
|
||||
public long ChannelId { get; set; }
|
||||
public string ChannelName { get; set; }
|
||||
public string CommandName { get; set; }
|
||||
}
|
||||
}
|
7
NadekoBot/_Models/DataModels/CurrencyStateModel.cs
Normal file
7
NadekoBot/_Models/DataModels/CurrencyStateModel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class CurrencyState : IDataModel {
|
||||
public long Value { get; set; }
|
||||
[SQLite.Unique]
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
7
NadekoBot/_Models/DataModels/CurrencyTransactionModel.cs
Normal file
7
NadekoBot/_Models/DataModels/CurrencyTransactionModel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class CurrencyTransaction : IDataModel {
|
||||
public string Reason { get; set; }
|
||||
public int Value { get; set; }
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
7
NadekoBot/_Models/DataModels/Donator.cs
Normal file
7
NadekoBot/_Models/DataModels/Donator.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class Donator : IDataModel {
|
||||
public long UserId { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public int Amount { get; set; }
|
||||
}
|
||||
}
|
14
NadekoBot/_Models/DataModels/IDataModel.cs
Normal file
14
NadekoBot/_Models/DataModels/IDataModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using SQLite;
|
||||
using System;
|
||||
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
internal abstract class IDataModel
|
||||
{
|
||||
[PrimaryKey, AutoIncrement]
|
||||
public int? Id { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("createdAt")]
|
||||
public DateTime DateAdded { get; set; } = DateTime.Now;
|
||||
public IDataModel() { }
|
||||
}
|
||||
}
|
9
NadekoBot/_Models/DataModels/MusicPlaylist.cs
Normal file
9
NadekoBot/_Models/DataModels/MusicPlaylist.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
internal class MusicPlaylist : IDataModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public long CreatorId { get; set; }
|
||||
public string CreatorName { get; set; }
|
||||
}
|
||||
}
|
8
NadekoBot/_Models/DataModels/PlaylistSongInfo.cs
Normal file
8
NadekoBot/_Models/DataModels/PlaylistSongInfo.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
internal class PlaylistSongInfo : IDataModel
|
||||
{
|
||||
public int PlaylistId { get; set; }
|
||||
public int SongInfoId { get; set; }
|
||||
}
|
||||
}
|
14
NadekoBot/_Models/DataModels/PokeTypes.cs
Normal file
14
NadekoBot/_Models/DataModels/PokeTypes.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
class UserPokeTypes : IDataModel
|
||||
{
|
||||
public long UserId { get; set; }
|
||||
public string type { get; set; }
|
||||
}
|
||||
}
|
14
NadekoBot/_Models/DataModels/Reminder.cs
Normal file
14
NadekoBot/_Models/DataModels/Reminder.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
class Reminder : IDataModel
|
||||
{
|
||||
public DateTime When { get; set; }
|
||||
public long ChannelId { get; set; }
|
||||
public long ServerId { get; set; }
|
||||
public long UserId { get; set; }
|
||||
public string Message { get; set; }
|
||||
public bool IsPrivate { get; set; }
|
||||
}
|
||||
}
|
10
NadekoBot/_Models/DataModels/RequestModel.cs
Normal file
10
NadekoBot/_Models/DataModels/RequestModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class Request : IDataModel {
|
||||
public string UserName { get; set; }
|
||||
public long UserId { get; set; }
|
||||
public string ServerName { get; set; }
|
||||
public long ServerId { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("Request")]
|
||||
public string RequestText { get; set; }
|
||||
}
|
||||
}
|
14
NadekoBot/_Models/DataModels/SongInfo.cs
Normal file
14
NadekoBot/_Models/DataModels/SongInfo.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using SQLite;
|
||||
|
||||
namespace NadekoBot.DataModels
|
||||
{
|
||||
internal class SongInfo : IDataModel
|
||||
{
|
||||
public string Provider { get; internal set; }
|
||||
public int ProviderType { get; internal set; }
|
||||
public string Title { get; internal set; }
|
||||
public string Uri { get; internal set; }
|
||||
[Unique]
|
||||
public string Query { get; internal set; }
|
||||
}
|
||||
}
|
10
NadekoBot/_Models/DataModels/StatsModel.cs
Normal file
10
NadekoBot/_Models/DataModels/StatsModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class Stats : IDataModel {
|
||||
public int ConnectedServers { get; set; }
|
||||
public int OnlineUsers { get; set; }
|
||||
public TimeSpan Uptime { get; set; }
|
||||
public int RealOnlineUsers { get; set; }
|
||||
}
|
||||
}
|
5
NadekoBot/_Models/DataModels/TypingArticleModel.cs
Normal file
5
NadekoBot/_Models/DataModels/TypingArticleModel.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class TypingArticle : IDataModel {
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
7
NadekoBot/_Models/DataModels/UserQuoteModel.cs
Normal file
7
NadekoBot/_Models/DataModels/UserQuoteModel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.DataModels {
|
||||
internal class UserQuote : IDataModel {
|
||||
public string UserName { get; set; }
|
||||
public string Keyword { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user