You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
746 B
Plaintext
24 lines
746 B
Plaintext
DbInfo.Init(typeof(RoleMapper).Assembly);
|
|
|
|
|
|
var dbContext = DbFactory.GetContext;
|
|
new PostgreSQLTableGenerator(dbContext).CreateTables(TableCreateMode.CreateNew);
|
|
|
|
dbContext.Insert(new Role()
|
|
{
|
|
ID = SnowflakeFactory.NewId,
|
|
RoleName = "管理层",
|
|
RoleLevel = 1
|
|
});
|
|
dbContext.Insert(new Role()
|
|
{
|
|
ID = SnowflakeFactory.NewId,
|
|
RoleName = "设备层",
|
|
RoleLevel = 2
|
|
});
|
|
dbContext.Insert(new Role()
|
|
{
|
|
ID = SnowflakeFactory.NewId,
|
|
RoleName = "使用层",
|
|
RoleLevel = 3
|
|
}); |