添加rabc项目模块

This commit is contained in:
橙子
2023-01-29 21:13:20 +08:00
parent d6565bd2d9
commit bb8508abbd
38 changed files with 772 additions and 26 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Data.DataSeeds;
using Yi.Framework.Ddd.Repositories;
using Yi.RBAC.Domain.School.Entities;
namespace Yi.RBAC.Domain.School.DataSeeds
{
[AppService(typeof(IDataSeed))]
public class StudentDataSeed : AbstractDataSeed<StudentEntity>
{
public StudentDataSeed(IRepository<StudentEntity> repository) : base(repository)
{
}
public override List<StudentEntity> GetSeedData()
{
return new List<StudentEntity>() { new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好", Phone = "123", Height = 188, IsDeleted = false } ,
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好1", Phone = "123", Height = 188, IsDeleted = false },
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好2", Phone = "123", Height = 188, IsDeleted = false }
};
}
}
}

View File

@@ -0,0 +1,25 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Data.Entities;
using Yi.Framework.Ddd.Entities;
namespace Yi.RBAC.Domain.School.Entities
{
[SugarTable("Student")]
public class StudentEntity : IEntity<long>,ISoftDelete
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public string Name { get; set; }
public int? Height { get; set; }
public string? Phone { get; set; }
public bool IsDeleted { get; set; } = false;
}
}