# WalkRoomApproveLog.java

    package cloud.wconnect.frontoffice.entity.walkroomrequest;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableId;

    import java.io.Serializable;

    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;

    /**
     * <p>
     * walk room审批日志表
     * </p>
     *
     * @author lichen
     * @since 2023-07-08
     */
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public class WalkRoomApproveLog implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 主键id
         */
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        /**
         * 资产id
         */
        private Integer propertyId;

        /**
         * 明细id
         */
        private Long dateinOtherId;

        /**
         * Walk Room Requests ID
         */
        private Long reqId;

        /**
         * 对应住店日(yyyyMMdd)
         */
        private Integer date;

        /**
         * 审批节点ID
         */
        private Long levelId;

        /**
         * 审批层级索引
         */
        private Integer approveIndex;

        /**
         * 审批人
         */
        private Integer approveBy;

        /**
         * 是否审核通过
         */
        private Boolean isApproved;

        /**
         * 审批时间
         */
        private Long approveTime;

        /**
         * 审批意见
         */
        private String approveOpinion;

        /**
         * 审批人 + 审批级别id
         *
         */
        public static String generateKey(Integer approveBy,Long levelId){
            return approveBy.toString() + "_" + levelId.toString();
        }

        /**
         * 入住记录id和审批层级索引组合成key
         *
         * @param otherId      入住记录id
         * @param approveIndex 审批层级索引
         * @return java.lang.String
         * @author lichen
         * @date 2023/7/24
         */
        public static String otherIdAndApproveIndexGenerateKey(Long otherId, Integer approveIndex) {
            return otherId.toString() + "_" + approveIndex.toString();
        }

        /**
         * 入住记录id和资产id组合成key
         *
         * @param otherId    入住记录id
         * @param propertyId 资产id
         * @return java.lang.String
         * @author lichen
         * @date 2023/8/15
         */
        public static String otherIdAndPropertyIdGenerateKey(Long otherId, Integer propertyId) {
            return otherId.toString() + "_" + propertyId.toString();
        }
    }