Files

59 lines
1.7 KiB
C#
Raw Permalink Normal View History

2022-09-19 17:25:43 +08:00
using SqlSugar;
using System;
2022-09-19 14:24:13 +08:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-01-01 23:06:11 +08:00
using Yi.Framework.Model.RABC.Entitys;
2022-09-19 14:24:13 +08:00
2023-01-01 23:06:11 +08:00
namespace Yi.Framework.Model.RABC.SeedData
2022-09-19 14:24:13 +08:00
{
public class UserSeed : AbstractSeed<UserEntity>
{
public override List<UserEntity> GetSeed()
{
2022-09-19 17:25:43 +08:00
UserEntity user1 = new UserEntity()
2022-09-19 14:24:13 +08:00
{
2023-01-01 23:06:11 +08:00
Id = SnowFlakeSingle.Instance.NextId(),
2022-09-19 14:24:13 +08:00
Name = "大橙子",
UserName = "cc",
Nick = "橙子",
2022-09-19 17:25:43 +08:00
Password = "123456",
2023-01-01 23:06:11 +08:00
Email = "454313500@qq.com",
Phone = "13800000000",
Sex = 0,
Address = "深圳",
Age = 20,
Introduction = "还有谁?",
OrderNum = 999,
Remark = "描述是什么呢?",
IsDeleted = false
2022-09-19 14:24:13 +08:00
};
2022-09-19 17:25:43 +08:00
user1.BuildPassword();
Entitys.Add(user1);
UserEntity user2 = new UserEntity()
{
Id = SnowFlakeSingle.Instance.NextId(),
Name = "大测试",
UserName = "test",
Nick = "测试",
Password = "123456",
2023-01-01 23:06:11 +08:00
Email = "454313500@qq.com",
2022-09-19 17:25:43 +08:00
Phone = "15900000000",
Sex = 0,
Address = "深圳",
Age = 18,
Introduction = "还有我!",
OrderNum = 1,
Remark = "我没有描述!",
IsDeleted = false
};
user2.BuildPassword();
Entitys.Add(user2);
2022-09-19 14:24:13 +08:00
return Entitys;
}
}
}