본문 바로가기
카테고리 없음

Spring JPA Mysql 타입

datetime

private Timestamp time = new Timestamp(System.currentTimeMillis());

 

boolean

public enum Boolean {
  NO,
  YES
}

private Boolean boolean = Boolean.FALSE;

 

char

@Column(length = 10, nullable=false, columnDefinition = "char")
private String status;

 

Long[java] -> bigint(20)[Mysql]