2017-09-13 01:12:40 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2016-10-08 02:25:12 +00:00
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
|
2017-10-13 04:14:54 +00:00
|
|
|
|
namespace NadekoBot.Core.Services.Database.Models
|
2016-10-08 02:25:12 +00:00
|
|
|
|
{
|
|
|
|
|
public class CustomReaction : DbEntity
|
|
|
|
|
{
|
|
|
|
|
public ulong? GuildId { get; set; }
|
2017-09-13 01:12:40 +00:00
|
|
|
|
|
2016-10-08 02:25:12 +00:00
|
|
|
|
[NotMapped]
|
2017-09-13 01:12:40 +00:00
|
|
|
|
[JsonIgnore]
|
2016-10-08 02:25:12 +00:00
|
|
|
|
public Regex Regex { get; set; }
|
|
|
|
|
public string Response { get; set; }
|
|
|
|
|
public string Trigger { get; set; }
|
2017-03-18 19:23:26 +00:00
|
|
|
|
|
2016-10-08 02:25:12 +00:00
|
|
|
|
public bool IsRegex { get; set; }
|
2016-10-09 04:38:46 +00:00
|
|
|
|
public bool OwnerOnly { get; set; }
|
2017-03-18 19:23:26 +00:00
|
|
|
|
public bool AutoDeleteTrigger { get; set; }
|
|
|
|
|
public bool DmResponse { get; set; }
|
2017-03-14 07:08:13 +00:00
|
|
|
|
|
2017-09-13 01:12:40 +00:00
|
|
|
|
[JsonIgnore]
|
2017-03-14 07:08:13 +00:00
|
|
|
|
public bool IsGlobal => !GuildId.HasValue;
|
2017-07-22 16:12:08 +00:00
|
|
|
|
|
|
|
|
|
public bool ContainsAnywhere { get; set; }
|
2016-10-08 02:25:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ReactionResponse : DbEntity
|
|
|
|
|
{
|
|
|
|
|
public bool OwnerOnly { get; set; }
|
|
|
|
|
public string Text { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|