Files
Util/test/Util.Domain.Tests/Samples/StringAggregateRootSample.cs
2023-07-11 10:00:30 +08:00

36 lines
953 B
C#

using System;
using Util.Domain.Entities;
namespace Util.Domain.Tests.Samples;
/// <summary>
/// string聚合根测试样例
/// </summary>
public class StringAggregateRootSample : AggregateRoot<StringAggregateRootSample, string> {
/// <summary>
/// 初始化string聚合根测试样例
/// </summary>
public StringAggregateRootSample()
: this( Guid.NewGuid().ToString() ) {
}
/// <summary>
/// 初始化string聚合根测试样例
/// </summary>
/// <param name="id">标识</param>
public StringAggregateRootSample( string id )
: base( id ) {
}
/// <summary>
/// 姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 添加变更列表
/// </summary>
protected override void AddChanges( StringAggregateRootSample other ) {
AddChange( "Name", "StringSampleName", Name, other.Name );
}
}