HuanMengAdmin/admin-generate-ef-seed-data/codes/MigrationsTUserModelBuilderExtensions.cs
2025-11-08 00:02:14 +08:00

13 lines
1.5 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.EntityFramework.Admin.Migrations.SeedsDatas.Datas;
public static class MigrationsTUserModelBuilderExtensions
{
public static void Seed(this ModelBuilder modelBuilder)
{
// ===============================================表T_User 种子数据=============================================
modelBuilder.Entity<TUser>().HasData(new TUser(){Id=1,CreatedAt=DateTime.Parse("2024/7/9 3:33:09"),Email="",Ip=null,IsActive=bool.Parse("True"),LastLoginAt=DateTime.Parse("2024/7/9 3:33:09"),LastLoginTypeAt=1,NickName="新用户",PhoneNum="18761127117",RegisterType=1,TenantId=Guid.Parse("00000000-0000-0000-0000-000000000000"),UpdatedAt=DateTime.Parse("2024/7/9 3:33:09"),UserName="18761127117"},new TUser(){Id=2,CreatedAt=DateTime.Parse("2024/7/9 3:40:58"),Email="",Ip="::ffff:101.229.91.116",IsActive=bool.Parse("True"),LastLoginAt=DateTime.Parse("2024/7/17 12:55:01"),LastLoginTypeAt=1,NickName="新用户",PhoneNum="17521010998",RegisterType=1,TenantId=Guid.Parse("00000000-0000-0000-0000-000000000000"),UpdatedAt=DateTime.Parse("2024/7/9 3:40:58"),UserName="17521010998"},new TUser(){Id=3,CreatedAt=DateTime.Parse("2024/7/10 21:52:49"),Email="",Ip="::ffff:101.229.91.116",IsActive=bool.Parse("True"),LastLoginAt=DateTime.Parse("2024/7/18 0:11:31"),LastLoginTypeAt=0,NickName="新用户",PhoneNum="18631081161",RegisterType=1,TenantId=Guid.Parse("00000000-0000-0000-0000-000000000000"),UpdatedAt=DateTime.Parse("2024/7/10 21:52:49"),UserName="18631081161"});
}
}