📜  jpa 枚举作为字符串 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.783000             🧑  作者: Mango

代码示例1
@Entity
public class Article {
    @Id
    private int id;

    private String title;

    @Enumerated(EnumType.ORDINAL)
    private Status status;

    @Enumerated(EnumType.STRING)
    private Type type;
}