HuanMengAdmin/admin-server/MiaoYu.Repository.Admin/Migrations/SeedsDatas/Datas/MigrationsSysDictionaryModelBuilderExtensions.cs
2024-07-18 02:27:50 +08:00

12 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace MiaoYu.Repository.Admin.Migrations.SeedsDatas.Datas;
public static class MigrationsSysDictionaryModelBuilderExtensions
{
public static void Seed(this ModelBuilder modelBuilder)
{
// ===============================================表sys_dictionary 种子数据=============================================
modelBuilder.Entity<SysDictionary>().HasData(new SysDictionary() { Id = 1, Code = "news_type", CreationTime = DateTime.Parse("2021/7/25 22:31:30"), CreatorUserId = null, LastModificationTime = DateTime.Parse("2021/7/25 22:39:34"), LastModifierUserId = null, Name = "资讯类别", ParentId = null, Sort = 1, Value = null }, new SysDictionary() { Id = 2, Code = "news_type_nan", CreationTime = DateTime.Parse("2021/7/25 22:38:49"), CreatorUserId = null, LastModificationTime = DateTime.Parse("2021/7/25 22:40:30"), LastModifierUserId = null, Name = "男", ParentId = 1, Sort = 1, Value = "1" }, new SysDictionary() { Id = 3, Code = "news_type_nv", CreationTime = DateTime.Parse("2021/7/25 22:40:47"), CreatorUserId = null, LastModificationTime = DateTime.Parse("2022/7/6 21:55:30"), LastModifierUserId = null, Name = "女", ParentId = 1, Sort = 2, Value = "2" }, new SysDictionary() { Id = 4, Code = "3", CreationTime = DateTime.Parse("2022/6/29 20:55:46"), CreatorUserId = null, LastModificationTime = DateTime.Parse("2022/6/29 20:55:46"), LastModifierUserId = null, Name = "未知", ParentId = 1, Sort = 0, Value = "3" });
}
}