示例#1
0
        public Validation <Error, Document> Reject(RejectReason reason)
        {
            if (Status != DocumentStatus.WaitingForApproval)
            {
                return(new InvalidStatusError(DocumentStatus.WaitingForApproval, Status));
            }

            return(new RejectedDocument(Id, UserId, Number, Description, Files, reason));
        }
示例#2
0
 public RejectedDocument(DocumentId id, UserId userId, DocumentNumber number,
                         Option <DocumentDescription> description, IEnumerable <File> files, RejectReason reason) : base(id, userId,
                                                                                                                         number, description, DocumentStatus.Rejected, files)
 {
     Reason = reason;
 }