package com.ruoyi.project.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.List;

/**
 * 国家表 tb_country
 *
 * @author ruoyi
 * @date 2024-04-15
 */
@Getter
@Setter
@TableName("tb_country")
public class TbCountry extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 国家ID
     */
    @Excel(name = "国家编号", i18nCode = "country.id")
    @TableId(type = IdType.AUTO)
    private Long countryId;

    /**
     * 国家名称
     */
    @Excel(name = "国家名称", i18nCode = "country.name")
    private String countryName;

    /**
     * 国家名称
     */
    @Excel(name = "国家名称（英）", i18nCode = "nation.countryNameUS")
    @TableField("country_nameUS")
    private String countryNameUS;

    /**
     * 国家名称
     */
    @Excel(name = "国家名称（俄）", i18nCode = "nation.countryNameRU")
    @TableField("country_nameRU")
    private String countryNameRU;

    /**
     * 国家名称
     */
    @Excel(name = "国家名称（西）", i18nCode = "nation.countryNameES")
    @TableField("country_nameES")
    private String countryNameES;
    /**
     * 国家缩写
     */
    @Excel(name = "国家名称（西）", i18nCode = "nation.countryAbbr")
    @TableField("country_abbr")
    private String countryAbbr;
    /**
     * 国家折扣率
     */
    @Excel(name = "折扣率(%)", i18nCode = "country.discount")
    private BigDecimal discount;

    /**
     * 删除标记（0：启用  1：停用）
     */
    @TableLogic
    private String delFlag;

    @TableField(exist = false)
    private List<Long> ids;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("countryId", getCountryId())
                .append("countryName", getCountryName())
                .append("discount", getDiscount())
                .append("delFlag", getDelFlag())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .toString();
    }
}
