コード例 #1
0
 private void Handle(CashTransferCreatedEvent evnt)
 {
     _id       = evnt.AggregateRootId;
     _nunber   = evnt.Number;
     _info     = evnt.Info;
     _type     = evnt.Type;
     _status   = evnt.Status;
     _walletId = evnt.WalletId;
 }
コード例 #2
0
 public CreateCashTransferCommand(Guid id,
                                  Guid walletId,
                                  string number,
                                  CashTransferType type,
                                  CashTransferStatus status,
                                  decimal amount,
                                  decimal fee,
                                  WalletDirection direction,
                                  string remark) : base(id)
 {
     WalletId  = walletId;
     Number    = number;
     Type      = type;
     Status    = status;
     Amount    = amount;
     Fee       = fee;
     Direction = direction;
     Remark    = remark;
 }
コード例 #3
0
 private void Handle(CashTransferStatusChangedEvent evnt)
 {
     _status = evnt.Status;
 }
コード例 #4
0
        private CashTransferStatus _status; //状态


        public CashTransfer(Guid id, Guid walletId, string number, CashTransferInfo info, CashTransferType type, CashTransferStatus status)
            : base(id)
        {
            id.CheckNotEmpty(nameof(id));
            walletId.CheckNotEmpty(nameof(walletId));
            info.CheckNotNull(nameof(info));

            ApplyEvent(new CashTransferCreatedEvent(walletId, number, info, type, status));
        }
コード例 #5
0
 public CashTransferStatusChangedEvent(CashTransferStatus status, decimal finallyValue)
 {
     Status       = status;
     FinallyValue = finallyValue;
 }
コード例 #6
0
 public CashTransferCreatedEvent(Guid walletId, string number, CashTransferInfo info, CashTransferType type, CashTransferStatus status) : base(walletId, number)
 {
     Info   = info;
     Type   = type;
     Status = status;
 }