using Api.Framework.SDK;
using Api.Framework.Tools;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutoAnswer.Entitys
{
///
/// 用户自定义回复库
///
public class fl_plugin_autoanswer_userdefinedlibrary : base_model
{
///
/// 平台类型
///
public string chat_type { get; set; }
///
/// 关键词
///
public string antistop { get; set; }
///
/// 匹配模式 0是为完全匹配,false为模糊 and 正则表达式 【这里用int类型,主要是因为dev中的Gridcontrol bool好像不支持 修改界面显示】
///
public int match_pattern { get; set; }
///
/// 回复内容
///
[SugarColumn(Length = 10000)]//设置字段为长文本
public string content { get; set; }
///
/// 是否通知管理员 【这里用int类型,主要是因为dev中的Gridcontrol bool好像不支持 修改界面显示】
///
public int is_alert_admin { get; set; }
public bool CheckChatType(ChatType type)
{
return string.IsNullOrWhiteSpace(this.chat_type) ? false : this.chat_type.Split(',').FirstOrDefault(f => ushort.Parse(f) == (ushort)type) != null ? true : false;
}
}
}