数据库种子初始化搭建
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -11,15 +12,46 @@ namespace Yi.Framework.Model.SeedData
|
||||
{
|
||||
public override List<UserEntity> GetSeed()
|
||||
{
|
||||
UserEntity user = new UserEntity()
|
||||
UserEntity user1 = new UserEntity()
|
||||
{
|
||||
Id =SnowFlakeSingle.Instance.NextId(),
|
||||
Name = "大橙子",
|
||||
UserName = "cc",
|
||||
Nick = "橙子",
|
||||
Password = "123456"
|
||||
Password = "123456",
|
||||
Email="454313500@qq.com",
|
||||
Phone="13800000000",
|
||||
Sex=0,
|
||||
Address="深圳",
|
||||
Age=20,
|
||||
Introduction="还有谁?",
|
||||
OrderNum=999,
|
||||
Remark="描述是什么呢?",
|
||||
IsDeleted=false
|
||||
};
|
||||
user.BuildPassword();
|
||||
Entitys.Add(user);
|
||||
user1.BuildPassword();
|
||||
Entitys.Add(user1);
|
||||
|
||||
UserEntity user2 = new UserEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
Name = "大测试",
|
||||
UserName = "test",
|
||||
Nick = "测试",
|
||||
Password = "123456",
|
||||
Email = "454313500@qq.com",
|
||||
Phone = "15900000000",
|
||||
Sex = 0,
|
||||
Address = "深圳",
|
||||
Age = 18,
|
||||
Introduction = "还有我!",
|
||||
OrderNum = 1,
|
||||
Remark = "我没有描述!",
|
||||
IsDeleted = false
|
||||
};
|
||||
user2.BuildPassword();
|
||||
Entitys.Add(user2);
|
||||
|
||||
return Entitys;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user