/**
 * BladeX Commercial License Agreement
 * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
 * <p>
 * Use of this software is governed by the Commercial License Agreement
 * obtained after purchasing a license from BladeX.
 * <p>
 * 1. This software is for development use only under a valid license
 * from BladeX.
 * <p>
 * 2. Redistribution of this software's source code to any third party
 * without a commercial license is strictly prohibited.
 * <p>
 * 3. Licensees may copyright their own code but cannot use segments
 * from this software for such purposes. Copyright of this software
 * remains with BladeX.
 * <p>
 * Using this software signifies agreement to this License, and the software
 * must not be used for illegal purposes.
 * <p>
 * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
 * not liable for any claims arising from secondary or illegal development.
 * <p>
 * Author: Chill Zhuang (bladejava@qq.com)
 */
package org.springblade.system.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 币种汇率实体类
 *
 * @author Chill
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_currency")
@Schema(description = "币种汇率")
public class Currency extends BaseEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * 币种代码
	 */
	@Schema(description = "币种代码")
	private String code;
	/**
	 * 币种中文名称
	 */
	@Schema(description = "币种中文名称")
	private String name;
	/**
	 * 币种英文名称
	 */
	@Schema(description = "币种英文名称")
	private String englishName;
	/**
	 * 货币符号
	 */
	@Schema(description = "货币符号")
	private String symbol;
	/**
	 * 小数位数
	 */
	@Schema(description = "小数位数")
	private Integer decimalPlaces;
	/**
	 * 汇率
	 */
	@Schema(description = "汇率")
	private BigDecimal exchangeRate;
	/**
	 * 生效日期
	 */
	@Schema(description = "生效日期")
	private LocalDate effectiveDate;
	/**
	 * 失效日期
	 */
	@TableField(updateStrategy = FieldStrategy.ALWAYS)
	@Schema(description = "失效日期")
	private LocalDate expiryDate;
	/**
	 * 是否本位币
	 */
	@TableField("is_base_currency")
	@Schema(description = "是否本位币")
	private Integer baseCurrency;
	/**
	 * 数据来源
	 */
	@Schema(description = "数据来源")
	private String dataSource;
	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

}
