这是我的数据类。
@Entity
@Table(name = "loan_category")
data class Loan_category (
@Id
@Column(name = "loan_id")
@GeneratedValue(strategy = GenerationType.AUTO)
val id: Long? = null,
@Column(name = "category_name",unique = true,nullable = false)
val categoryName : String = "",
@Column(name = "interest_rate")
val interest_rate : Float = 0.0F,
@Column(name = "overdue_interest")
val overdue_interest : Float = 0.0F,
@Column(name = "overdue_period")
val overdue_period : String = "",
@Column(name = "minSurety")
val minSurety:Int = 0,
@Column(name = "totaline")
val totalFine: Float = 0.0F
)
我想像ArrayList
在另一个实体中一样声明这个数据类。怎么做到呢?