拆分模块
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@MappedSuperclass
|
||||
@ToString
|
||||
public class BaseEnumEntity<T extends Enum<?>> implements IdentityEntity {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "TYPE")
|
||||
@Enumerated(EnumType.STRING)
|
||||
private T type;
|
||||
|
||||
/**
|
||||
* Language
|
||||
*/
|
||||
@Column(name = "LANG")
|
||||
private String lang;
|
||||
|
||||
@Column(name = "VALUE")
|
||||
private String value;
|
||||
}
|
||||
Reference in New Issue
Block a user