using System;
using Util.Domains;
namespace Util.Tests.Samples {
///
/// string聚合根测试样例
///
public class StringAggregateRootSample : AggregateRoot {
///
/// 初始化string聚合根测试样例
///
public StringAggregateRootSample()
: this( Guid.NewGuid().ToString() ) {
}
///
/// 初始化string聚合根测试样例
///
/// 标识
public StringAggregateRootSample( string id )
: base( id ) {
}
///
/// 姓名
///
public string Name { get; set; }
///
/// 添加描述
///
protected override void AddDescriptions() {
AddDescription( "Id:" + Id + "," );
AddDescription( "姓名", Name );
}
///
/// 添加变更列表
///
protected override void AddChanges( StringAggregateRootSample other ) {
AddChange( "Name", "StringSampleName", Name, other.Name );
}
}
}