package com.friday.custody.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

/**
 * 
 * 
 * @author lyb
 * @email k0051582@gmail.com
 * @date 2022-03-04 16:12:06
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("custody_fund_profit_info")
public class FundProfitInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId(value = "id",type = IdType.AUTO)
	private Integer id;
	/**
	 * TA确认编号
	 */
	private String cserialNo;
	/**
	 * 原TA确认单编号
	 */
	private String oriCserialNo;
	/**
	 * 基金备案编码
	 */
	private String fundCode;
	/**
	 * 基金内部代码
	 */
	private String innerFundCode;
	/**
	 * 基金名称
	 */
	private String fundName;
	/**
	 * 数据字典：销售商
	 */
	private String agencyNo;
	/**
	 * 销售商名称
	 */
	private String agencyName;
	/**
	 * 销售网点代码
	 */
	private String branchCode;
	/**
	 * 基金账户
	 */
	private String fundAcco;
	/**
	 * 交易账号
	 */
	private String tradeAcco;
	/**
	 * 业绩报酬申请日期
	 */
	private String requestDate;
	/**
	 * 业绩报酬确认日期（计提日期）
	 */
	private String confirmDate;
	/**
	 * 数据字典：业务类型
	 */
	private String businessName;
	/**
	 * 数据字典：处理类型
	 */
	private String sortFlag;
	/**
	 * 应提成，保底金额
	 */
	private BigDecimal oriBalance;
	/**
	 * 实际提成，保底金额
	 */
	private BigDecimal factBalance;
	/**
	 * 实际提成，保底份额
	 */
	private BigDecimal factShares;
	/**
	 * 份额级别
	 */
	private String shareLevel;
	/**
	 * 数据字典：收费方式
	 */
	private String shareType;
	/**
	 * 数据字典：计提方式
	 */
	private String triggerType;
	/**
	 * 份额明细注册日期
	 */
	private String registDate;
	/**
	 * 期初日期
	 */
	private String oriDate;
	/**
	 * 持有天数
	 */
	private String holdDay;
	/**
	 * 发生金额
	 */
	private BigDecimal shares;
	/**
	 * 期初单位净值
	 */
	private BigDecimal oriNav;
	/**
	 * 期初累计净值
	 */
	private BigDecimal oriTotalNav;
	/**
	 * 期末单位净值
	 */
	private BigDecimal nav;
	/**
	 * 期末累计净值
	 */
	private BigDecimal totalNav;
	/**
	 * 当前受益率
	 */
	private BigDecimal currRatio;
	/**
	 * 年化受益率
	 */
	private BigDecimal yearRatio;
	/**
	 * 保底受益率
	 */
	private BigDecimal standardRatio;
	/**
	 * 已退手续费
	 */
	private BigDecimal returnFare;
	/**
	 * 分红总金额
	 */
	private BigDecimal bonusBalance;
	/**
	 * 实际收益
	 */
	private BigDecimal income;
	/**
	 * 业绩提成比例
	 */
	private BigDecimal deductRatio;
	/**
	 * 应提成/保底金额
	 */
	private BigDecimal valueAddedFare;
	/**
	 * 成本价
	 */
	private BigDecimal costPrice;
	/**
	 * 累计单位分红
	 */
	private BigDecimal totalUnitBonus;
	/**
	 * 托管人编码
	 */
	private String trustNo;
	/**
	 * 租户名
	 */
	private String admin;
	/**
	 * 唯一索引：用于插入
	 */
	private String uniqueKey;
	/**
	 * 版本
	 */
	private String version;
	/**
	 * 
	 */
	private String remark;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新时间
	 */
	private Date updateTime;
	/**
	 * 是否删除(有效|0,无效|1)
	 */
	private Integer isDeleted;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		FundProfitInfoEntity that = (FundProfitInfoEntity) o;
		return Objects.equals(id, that.id) && Objects.equals(cserialNo, that.cserialNo) && Objects.equals(oriCserialNo, that.oriCserialNo) && Objects.equals(fundCode, that.fundCode) && Objects.equals(innerFundCode, that.innerFundCode) && Objects.equals(fundName, that.fundName) && Objects.equals(agencyNo, that.agencyNo) && Objects.equals(agencyName, that.agencyName) && Objects.equals(branchCode, that.branchCode) && Objects.equals(fundAcco, that.fundAcco) && Objects.equals(tradeAcco, that.tradeAcco) && Objects.equals(requestDate, that.requestDate) && Objects.equals(confirmDate, that.confirmDate) && Objects.equals(businessName, that.businessName) && Objects.equals(sortFlag, that.sortFlag) && Objects.equals(oriBalance, that.oriBalance) && Objects.equals(factBalance, that.factBalance) && Objects.equals(factShares, that.factShares) && Objects.equals(shareLevel, that.shareLevel) && Objects.equals(shareType, that.shareType) && Objects.equals(triggerType, that.triggerType) && Objects.equals(registDate, that.registDate) && Objects.equals(oriDate, that.oriDate) && Objects.equals(holdDay, that.holdDay) && Objects.equals(shares, that.shares) && Objects.equals(oriNav, that.oriNav) && Objects.equals(oriTotalNav, that.oriTotalNav) && Objects.equals(nav, that.nav) && Objects.equals(totalNav, that.totalNav) && Objects.equals(currRatio, that.currRatio) && Objects.equals(yearRatio, that.yearRatio) && Objects.equals(standardRatio, that.standardRatio) && Objects.equals(returnFare, that.returnFare) && Objects.equals(bonusBalance, that.bonusBalance) && Objects.equals(income, that.income) && Objects.equals(deductRatio, that.deductRatio) && Objects.equals(valueAddedFare, that.valueAddedFare) && Objects.equals(costPrice, that.costPrice) && Objects.equals(totalUnitBonus, that.totalUnitBonus) && Objects.equals(trustNo, that.trustNo) && Objects.equals(admin, that.admin) && Objects.equals(uniqueKey, that.uniqueKey) && Objects.equals(version, that.version) && Objects.equals(remark, that.remark) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime) && Objects.equals(isDeleted, that.isDeleted);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, cserialNo, oriCserialNo, fundCode, innerFundCode, fundName, agencyNo, agencyName, branchCode, fundAcco, tradeAcco, requestDate, confirmDate, businessName, sortFlag, oriBalance, factBalance, factShares, shareLevel, shareType, triggerType, registDate, oriDate, holdDay, shares, oriNav, oriTotalNav, nav, totalNav, currRatio, yearRatio, standardRatio, returnFare, bonusBalance, income, deductRatio, valueAddedFare, costPrice, totalUnitBonus, trustNo, admin, uniqueKey, version, remark, createTime, updateTime, isDeleted);
	}
}
