package com.yhy.module.core.dal.dataobject.quota;

import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
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 com.yhy.module.core.dal.typehandler.PostgreSQLJsonbTypeHandler;
import java.math.BigDecimal;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 定额调整设置 DO
 *
 * @author 芋道源码
 */
@TableName(value = "yhy_quota_adjustment_setting", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class QuotaAdjustmentSettingDO extends TenantBaseDO {

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 定额基价ID
     */
    private Long quotaItemId;

    /**
     * 调整名称
     */
    private String name;

    /**
     * 定额值
     */
    private BigDecimal quotaValue;

    /**
     * 调整内容
     */
    private String adjustmentContent;

    /**
     * 调整类型（字典）
     */
    private String adjustmentType;

    /**
     * 调整规则（JSON）
     */
    @TableField(typeHandler = PostgreSQLJsonbTypeHandler.class)
    private Map<String, Object> adjustmentRules;

    /**
     * 排序
     */
    private Integer sortOrder;

}
