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