# AdRequestDTO.java

    package cloud.wconnect.frontoffice.pojo.dto.adjustment;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import cloud.wconnect.commonlib.annotation.validator.enums.ValueOfEnum;
    import cloud.wconnect.frontoffice.cons.adjustment.MistakeTypeEnum;
    import lombok.Data;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.*;

    import java.io.Serializable;
    import java.math.BigDecimal;

    /**
     * 审批单列表
     */
    @Data
    public class AdRequestDTO implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 主键Id
         */
        private Long id;
        /**
         * 资产id
         */
        private Integer propertyId;
        /**
         * Conf.Num
         */
        @Length(max = 20, message = "the confNumber max length is 20")
        private String confNumber;
        /**
         * 单据类型 1:Sales 2:Front Desk 3:Accounting 4:Misposting
         */
        @NotNull(message = "the requestType must not be null")
        @Range(min = 1, max = 3, message = "the requestType must be 1:Sales 2:Front Desk 3:Accounting")
        private Integer requestType;
        /**
         * 责任选项：1:N/A   2:employee`s name
         */
        @NotNull(message = "the mistakeType must not be null")
        @ValueOfEnum(enumClass = MistakeTypeEnum.class)
        private Integer mistakeType;
        /**
         * 责任描述/员工姓名（根据责任选项决定）
         */
        @Length(max = 500, message = "the mistakeBy max length is 500")
        private String mistakeBy;
        /**
         * 来宾姓名或公司名
         */
        @NotNull(message = "the guestName must not be null")
        @Length(max = 60, message = "the guestName length max 60")
        private String guestName;
        /**
         * 入住日期 (年月日)
         */
        @NotNull(message = "the checkInDate must not be null")
        private Long checkInDate;
        /**
         * 退房日期 (年月日)
         */
        @NotNull(message = "the checkOutDate must not be null")
        private Long checkOutDate;
        /**
         * 房间号
         */
        @NotNull(message = "the roomNumber must not be null")
        @Length(max = 10, message = "the roomNumber max length is 60")
        private String roomNumber;
        /**
         * 需调整金额
         */
        @NotNull(message = "the adjustedDollar must not be null")
        @DecimalMin(value = "0", message = "The adjustedDollar must be greater than 0")
        @DigitsCustom(integer = 8, message = "The adjustedDollar is wrong format")
        private BigDecimal adjustedDollar;
        /**
         * 交易code
         */
        @Length(max = 50, message = "the trxCode max length is 50")
        @NotBlank(message = "the trxCode must not be blank")
        private String trxCode;
        /**
         * 交易描述
         */
        @Length(max = 255, message = "the trxDesc max length is 255")
        private String trxDesc;
        /**
         * 选择原因 (1：Incorrect Company rate，2：Guest Relation/Complaint，3：Over payment，4：Change Credit Card or other Method of Payment，
         * 5：Incorrect Posting Correction will be posted，6：Other，7：Chargeback，8：DB Write Off,9:Misposting类型使用,10:Fraud)
         */
        @NotNull(message = "the choosedReason must not be null")
        @Range(min = 1, max = 10, message = "the choosedReason is between 1 and 10")
        private Integer choosedReason;
        /**
         * 原因详情 {company name：公司名，rate code：rate code，correct rate：房价，explain：解释，specify：指明，comment：备注}
         */
        @Length(max = 1000, message = "the choosedReasonDetails length max is 1000")
        private String choosedReasonDetails;
        /**
         * 备注
         */
        @Length(max = 500, message = "the comment max length is 500")
        private String comment;
        /**
         * 附件
         */
        private String attachments;
        /**
         * Case编号
         */
        private String caseNumber;
        /**
         * Revenue lost (yes / no)
         */
        @NotNull(message = "the revenueLost must not be null")
        private Boolean revenueLost;
        /**
         * 有权补录数据的责任人
         */
        @NotNull(message = "the dutyUser must not be null")
        private Integer dutyUser;
    }