Browse Source

去除键值对

master
郑勃旭 2 years ago
parent
commit
c01e95377d
  1. 11
      Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/DictCityAdress/DictCityAdress.cs
  2. 24
      Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/TestSchool/TestSchool.cs
  3. 16
      Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/TestSchool/TestStudentDetail.cs

11
Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/DictCityAdress/DictCityAdress.cs

@ -1,11 +0,0 @@
using Microsoft.EntityFrameworkCore;
namespace Faster.Zheng.Winin.AppBusiness.DictCityAdress
{
[Owned] //值对象特性
public class DictCityAdress
{
public string City { get; set; }
public string Street { get; set; }
}
}

24
Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/TestSchool/TestSchool.cs

@ -15,29 +15,5 @@ public class TestSchool : AuditedAggregateRoot<Guid>
public SchoolType OrderType { get; set; } public SchoolType OrderType { get; set; }
/// <summary>
/// 键值对的属性 需要添加非空 否则会有警告 但不影响使用
/// </summary>
[Required]
public DictCityAdress.DictCityAdress CityAdress { get; set; }
public List<TestStudentDetail> Details { get; set; } = new(); public List<TestStudentDetail> Details { get; set; } = new();
protected TestSchool()
{
}
public TestSchool(
Guid id,
string schoolName,
SchoolType orderType,
DictCityAdress.DictCityAdress cityAdress,
List<TestStudentDetail> details
) : base(id)
{
SchoolName = schoolName;
OrderType = orderType;
CityAdress = cityAdress;
Details = details;
}
} }

16
Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/AppBusiness/TestSchool/TestStudentDetail.cs

@ -14,20 +14,4 @@ public class TestStudentDetail : AuditedAggregateRoot<Guid>
public string StudentName { get; set; } public string StudentName { get; set; }
public StudentType OrderType { get; set; } public StudentType OrderType { get; set; }
protected TestStudentDetail()
{
}
public TestStudentDetail(
Guid id,
Guid masterId,
string studentName,
StudentType orderType
) : base(id)
{
MasterId = masterId;
StudentName = studentName;
OrderType = orderType;
}
} }

Loading…
Cancel
Save