protected virtual IOrderItemShipGrpInvReservationStateCreated Map(ICreateOrderItemShipGrpInvReservation c)
        {
            var stateEventId = new OrderItemShipGrpInvReservationEventId(c.OrderItemShipGrpInvResId, c.Version);
            IOrderItemShipGrpInvReservationStateCreated e = NewOrderItemShipGrpInvReservationStateCreated(stateEventId);

            e.ReserveOrderEnumId   = c.ReserveOrderEnumId;
            e.Quantity             = c.Quantity;
            e.QuantityNotAvailable = c.QuantityNotAvailable;
            e.ReservedDatetime     = c.ReservedDatetime;
            e.CreatedDatetime      = c.CreatedDatetime;
            e.PromisedDatetime     = c.PromisedDatetime;
            e.CurrentPromisedDate  = c.CurrentPromisedDate;
            e.Priority             = c.Priority;
            e.SequenceId           = c.SequenceId;
            e.OldPickStartDate     = c.OldPickStartDate;
            e.Active    = c.Active;
            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            var version = c.Version;


            return(e);
        }
        protected OrderItemShipGrpInvReservationStateDeleted NewOrderItemShipGrpInvReservationStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new OrderItemShipGrpInvReservationEventId(_state.OrderItemShipGrpInvResId, version);
            var e            = NewOrderItemShipGrpInvReservationStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }
        protected virtual IOrderItemShipGrpInvReservationStateDeleted Map(IDeleteOrderItemShipGrpInvReservation c)
        {
            var stateEventId = new OrderItemShipGrpInvReservationEventId(c.OrderItemShipGrpInvResId, c.Version);
            IOrderItemShipGrpInvReservationStateDeleted e = NewOrderItemShipGrpInvReservationStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();


            return(e);
        }
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            OrderItemShipGrpInvReservationEventId other = obj as OrderItemShipGrpInvReservationEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.OrderItemShipGrpInvResId, other.OrderItemShipGrpInvResId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
 private OrderItemShipGrpInvReservationStateDeleted NewOrderItemShipGrpInvReservationStateDeleted(OrderItemShipGrpInvReservationEventId stateEventId)
 {
     return(new OrderItemShipGrpInvReservationStateDeleted(stateEventId));
 }
 private OrderItemShipGrpInvReservationStateMergePatched NewOrderItemShipGrpInvReservationStateMergePatched(OrderItemShipGrpInvReservationEventId stateEventId)
 {
     return(new OrderItemShipGrpInvReservationStateMergePatched(stateEventId));
 }
 protected OrderItemShipGrpInvReservationEventBase(OrderItemShipGrpInvReservationEventId stateEventId)
 {
     this.OrderItemShipGrpInvReservationEventId = stateEventId;
 }
 public OrderItemShipGrpInvReservationStateDeleted(OrderItemShipGrpInvReservationEventId stateEventId) : base(stateEventId)
 {
 }
 public OrderItemShipGrpInvReservationStateMergePatched(OrderItemShipGrpInvReservationEventId stateEventId) : base(stateEventId)
 {
 }
 protected OrderItemShipGrpInvReservationStateEventBase(OrderItemShipGrpInvReservationEventId stateEventId) : base(stateEventId)
 {
 }