package com.hzs.common.domain.system.config;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * 消费配置详情表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("BD_AREA_CURRENCY_DETAIL")
@KeySequence("BD_AREA_CURRENCY_DETAIL_SEQ")
public class BdAreaCurrencyDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("PK_ID")
    private Long pkId;

    /**
     * 消费配置主键
     */
    @TableField("PK_AREA_CURRENCY")
    private Integer pkAreaCurrency;

    /**
     * 账户类型
     */
    @TableField("PK_ACCOUNT")
    private Integer pkAccount;

    /**
     * 扣除顺序
     */
    @TableField("DEDUCT_SORT")
    private Integer deductSort;

    /**
     * 扣除比例
     */
    @TableField("DEDUCT_RATIO")
    private BigDecimal deductRatio;

    /**
     * 是否抵扣账户 (0=是，1=否)
     */
    @TableField("IS_DEDUCTION")
    @Transaction(transactionKey = EnumsPrefixConstants.YES_NO)
    private Integer isDeduction;
    /**
     * 是否抵扣账户 (0=是，1=否)
     */
    @TableField(exist = false)
    private String isDeductionVal;

}
