feat: 增加财务报表表
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||||
|
|
||||||
|
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||||
|
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||||
|
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.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 + "balance_sheet")
|
||||||
|
public class BalanceSheet extends SimpleEntity {
|
||||||
|
@ManyToOne
|
||||||
|
private Stock stock;
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||||
|
|
||||||
|
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||||
|
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||||
|
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.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 + "cash_flow")
|
||||||
|
public class CashFlow extends SimpleEntity {
|
||||||
|
@ManyToOne
|
||||||
|
private Stock stock;
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||||
|
|
||||||
|
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||||
|
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||||
|
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.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 + "income")
|
||||||
|
public class Income extends SimpleEntity {
|
||||||
|
@ManyToOne
|
||||||
|
private Stock stock;
|
||||||
|
}
|
||||||
@@ -62,6 +62,18 @@ public class Stock extends SimpleEntity {
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private Set<Daily> dailies;
|
private Set<Daily> dailies;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||||
|
@ToString.Exclude
|
||||||
|
private Set<Income> incomes;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||||
|
@ToString.Exclude
|
||||||
|
private Set<BalanceSheet> balanceSheets;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||||
|
@ToString.Exclude
|
||||||
|
private Set<CashFlow> cashFlows;
|
||||||
|
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private Set<StockCollection> collections;
|
private Set<StockCollection> collections;
|
||||||
|
|||||||
Reference in New Issue
Block a user