package com.lanyuanxiaoyao.leopard.core.entity;

import com.lanyuanxiaoyao.leopard.core.Constants;
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@Setter
@Getter
@ToString(callSuper = true)
@FieldNameConstants
@Entity
@DynamicUpdate
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Table(name = Constants.DATABASE_PREFIX + "finance_indicator")
public class FinanceIndicator extends SimpleEntity {
  @ManyToOne
  private Stock stock;
  @Column(name = "`year`", nullable = false)
  @Comment("年报年度")
  private Integer year;
  @Comment("总股本")
  private Double totalShareCapital;
  @Comment("资本公积金")
  private Double capitalSurplus;
  @Comment("盈余公积金")
  private Double surplusReserve;
  @Comment("未分配利润")
  private Double undistributedProfit;
  @Comment("现金及现金等价物")
  private Double cashAndCashEquivalents;
  @Comment("现金及现金等价物占总资产比率")
  private Double cashAndCashEquivalentsToTotalAssetsRatio;
  @Comment("应收账款")
  private Double accountsReceivable;
  @Comment("应收账款占总资产比率")
  private Double accountsReceivableToTotalAssetsRatio;
  @Comment("应付账款")
  private Double accountsPayable;
  @Comment("应付账款占总资产比率")
  private Double accountsPayableToTotalAssetsRatio;
  @Comment("存货")
  private Double inventory;
  @Comment("存货占总资产比率")
  private Double inventoryToTotalAssetsRatio;
  @Comment("商誉")
  private Double goodwill;
  @Comment("商誉占总资产比率")
  private Double goodwillToTotalAssetsRatio;
  @Comment("流动资产")
  private Double currentAssets;
  @Comment("流动资产占总资产比率")
  private Double currentAssetsToTotalAssetsRatio;
  @Comment("固定资产")
  private Double fixedAssets;
  @Comment("固定资产占总资产比率")
  private Double fixedAssetsToTotalAssetsRatio;
  @Comment("流动负债")
  private Double currentLiabilities;
  @Comment("流动负债占总资产比率")
  private Double currentLiabilitiesToTotalAssetsRatio;
  @Comment("流动负债占总负债比率")
  private Double currentLiabilitiesToTotalLiabilitiesRatio;
  @Comment("长期负债")
  private Double longTermLiabilities;
  @Comment("长期负债占总资产比率")
  private Double longTermLiabilitiesToTotalAssetsRatio;
  @Comment("长期负债占总负债比率")
  private Double longTermLiabilitiesToTotalLiabilitiesRatio;
  @Comment("总负债")
  private Double totalLiabilities;
  @Comment("负债占总资产比率")
  private Double liabilitiesToTotalAssetsRatio;
  @Comment("股东权益")
  private Double shareholdersEquity;
  @Comment("股东权益占总资产比率")
  private Double shareholdersEquityToTotalAssetsRatio;
  @Comment("总资产")
  private Double totalAssets;
  @Comment("营业收入")
  private Double operatingRevenue;
  @Comment("营业成本")
  private Double operatingCost;
  @Comment("营业利润")
  private Double operatingProfit;
  @Comment("营业支出")
  private Double operatingExpenses;
  @Comment("净利润")
  private Double netProfit;
  @Comment("经营活动现金流净额")
  private Double netCashFlowFromOperatingActivities;
  @Comment("营业活动现金流量")
  private Double cashFlowFromOperatingActivities;
  @Comment("投资活动现金流量")
  private Double cashFlowFromInvestingActivities;
  @Comment("筹资活动现金流量")
  private Double cashFlowFromFinancingActivities;
  @Comment("流动比率")
  private Double currentRatio;
  @Comment("速动比率")
  private Double quickRatio;
  @Comment("长期资金占固定资产比率")
  private Double longTermFundsToFixedAssetsRatio;
  @Comment("应收账款周转率")
  private Double accountsReceivableTurnover;
  @Comment("应收账款周转天数（平均收现天数）")
  private Double daysAccountsReceivableTurnover;
  @Comment("存货周转率")
  private Double inventoryTurnover;
  @Comment("存货周转天数（平均销货天数）")
  private Double daysInventoryTurnover;
  @Comment("固定资产周转率")
  private Double fixedAssetsTurnover;
  @Comment("固定资产周转天数")
  private Double daysFixedAssetsTurnover;
  @Comment("总资产周转率")
  private Double totalAssetsTurnover;
  @Comment("总资产周转天数")
  private Double daysTotalAssetsTurnover;
  @Comment("ROE")
  private Double returnOnEquity;
  @Comment("ROA")
  private Double returnOnAssets;
  @Comment("营业毛利率")
  private Double operatingGrossProfitMargin;
  @Comment("营业利益率")
  private Double operatingProfitMargin;
  @Comment("经营安全边际率")
  private Double operatingSafetyMarginRatio;
  @Comment("净利率")
  private Double netProfitMargin;
  @Comment("每股盈余")
  private Double earningsPerShare;
  @Comment("现金流量比率")
  private Double cashFlowRatio;
  @Comment("现金流量允当比率")
  private Double cashFlowAdequacyRatio;
  @Comment("现金再投资比率")
  private Double cashReinvestmentRatio;
}
