Skip to content

Instantly share code, notes, and snippets.

@Raouf25
Last active April 23, 2020 12:40
Show Gist options
  • Save Raouf25/ee99d52876f6a4fe9542d713b1745d43 to your computer and use it in GitHub Desktop.
Save Raouf25/ee99d52876f6a4fe9542d713b1745d43 to your computer and use it in GitHub Desktop.
package com.mak.springbootefficientsearchapi.entity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
@Getter
@Setter
@Entity
@NoArgsConstructor
@AllArgsConstructor
public class Car {
@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@NotNull
@Column(nullable = false)
private String manufacturer;
@NotNull
@Column(nullable = false)
private String model;
@NotNull
@Column(nullable = false)
private String type;
@NotNull
@Column(nullable = false)
private String country;
@NotNull
@Column(nullable = false)
private LocalDate createDate;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment