Skip to content

Commit

Permalink
update 删除无用字段
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Feb 21, 2023
1 parent 327f42d commit fc588e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions XinjingdailyBot.Model/Models/Tags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,8 @@ public sealed record Tags : BaseModel
/// </summary>
public string KeyWords { get; set; } = "";
/// <summary>
/// 投稿时识别到此Tag是否自动添加遮罩, 手动添加Tag时不生效
/// </summary>
public bool AutoSpoiler { get; set; }
/// <summary>
/// 警告文本, 带有此Tag的投稿会在发布时提前发送警告
/// </summary>
public string WarnText { get; set; } = "";
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateAt { get; set; } = DateTime.Now;
}
}
8 changes: 4 additions & 4 deletions XinjingdailyBot.Repository/TagRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ private async Task InsertBuildInTags()
{
List<Tags> tags = new()
{
new() { Id = 1,Name = "NSFW", Payload = "nsfw", KeyWords = "NSFW", AutoSpoiler = true, WarnText = Langs.NSFWWarning },
new() { Id = 2,Name = "我有一个朋友", Payload = "friend", KeyWords = "朋友|英雄", AutoSpoiler = false },
new() { Id = 3,Name = "晚安", Payload = "wanan", KeyWords = "晚安", AutoSpoiler = false },
new() { Id = 4,Name = "AI怪图", Payload = "ai", KeyWords = "#AI", AutoSpoiler = false },
new() { Id = 1,Name = "NSFW", Payload = "nsfw", KeyWords = "NSFW", WarnText = Langs.NSFWWarning },
new() { Id = 2,Name = "我有一个朋友", Payload = "friend", KeyWords = "朋友|英雄" },
new() { Id = 3,Name = "晚安", Payload = "wanan", KeyWords = "晚安" },
new() { Id = 4,Name = "AI怪图", Payload = "ai", KeyWords = "#AI" },
};

await Storageable(tags).ExecuteCommandAsync();
Expand Down

0 comments on commit fc588e3

Please sign in to comment.