Table of Contents
@Builder.Default 별로다
@Builder.Default 별로다.
디폴트 값 지정
그냥 String useyn = "Y"
처럼 값을 지정하는게 맞다.
@Setter
@Getter
@NoArgsConstructor
@Entity
@Table(name = "tbl_brands", catalog = "db_items")
public class Brands extends BaseTimeEntity implements Persistable<String> {
public static final String NamedQuery_GetBrandList = "getBrandList";
@Id
private String brandId;
@NotNull
@Column(length = 32)
private String partnerId;
@NotNull
@Column(length = 128)
private String brandName;
@NotNull
@ColumnDefault("Y")
@Column(length = 1)
private String useyn = "Y";
public Brands(String brandId) {
this.brandId = brandId;
}
@Override
public String getId() {
return brandId;
}
@Override
public boolean isNew() {
return getRegdate() == null;
}
}