41 lines
894 B
Java
41 lines
894 B
Java
package cryptosky.me.dbgateway.jpa.entities;
|
|
|
|
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import javax.persistence.*;
|
|
import java.io.Serializable;
|
|
import java.time.LocalDate;
|
|
|
|
@Data
|
|
@EqualsAndHashCode
|
|
@Entity
|
|
public class BtcEntity implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@Id
|
|
@Column(name = "ID", nullable = false)
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
private int id;
|
|
|
|
@Column(name = "type", nullable = false)
|
|
private String type;
|
|
|
|
@Column(name = "model_code", nullable = false)
|
|
private String modelCode;
|
|
|
|
@Column(name = "brand_name")
|
|
private String brandName;
|
|
|
|
@Column(name = "launch_date")
|
|
private LocalDate launchDate;
|
|
|
|
private transient String formattedDate;
|
|
|
|
// Getter and setter
|
|
public String getFormattedDate() {
|
|
return getLaunchDate().toString();
|
|
}
|
|
}
|