# M3Variable.java

    package cloud.wconnect.finance.entity.pl;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableField;
    import com.baomidou.mybatisplus.annotation.TableId;
    import com.baomidou.mybatisplus.annotation.TableName;
    import java.io.Serializable;
    import lombok.Getter;
    import lombok.Setter;
    import lombok.ToString;
    import lombok.experimental.Accessors;

    /**
     * <p>
     *
     * </p>
     *
     * @author lichen
     * @since 2025-09-25
     */
    @Getter
    @Setter
    @ToString
    @Accessors(chain = true)
    @TableName("m3_variable")
    public class M3Variable implements Serializable {

        private static final long serialVersionUID = 1L;

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

        /**
         * 租户id
         */
        private Integer tenantId;

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

        private String name;

        /**
         * 表示公式
         */
        @TableField("`value`")
        private String value;

        /**
         * 变量类型1：常量 2：公式 3：特殊类型，例如{[Total Rooms Available]}表示房间数
         */
        private Integer type;

        private String updateLog;

        /**
         * 类型
         */
        public static final int TYPE_CONSTANT = 1;
        public static final int TYPE_FORMULA = 2;
        public static final int TYPE_SPECIAL = 3;

        // {[Rooms Rented]}变量
        public static final String NAME_TOTAL_ROOMS_RENTED = "{[Rooms Rented]}";

        // {[Total Rooms Available]}变量
        public static final String NAME_TOTAL_ROOMS_AVAILABLE = "{[Total Rooms Available]}";
    }