private void Handle(AppSystemCreated evnt) { _id = evnt.AggregateRootId; _info = evnt.Info; _safeKey = evnt.SafeKey; _status = AppSystemStatus.Normal.ToString(); _useFlag = (int)UseFlag.Useable; }
private void Handle(AppSystemUpdated evnt) { var editableInfo = evnt.Info; _info = new AppSystemInfo(_info.Code, editableInfo.Name, _info.AccountId, editableInfo.ReMark) { CreateTime = _info.CreateTime }; }
public AppSystemCreated(AppSystemInfo info, string safeKey) { Info = info; SafeKey = safeKey; }
/// <summary>创建应用系统 /// </summary> public AppSystem(string id, AppSystemInfo info, string safeKey) : base(id) { Assert.IsNotNullOrEmpty("应用系统名称", info.Name); Assert.IsNotNullOrEmpty("应用系统代码", info.Code); ApplyEvent(new AppSystemCreated(info, safeKey)); }