Skip to content

Instantly share code, notes, and snippets.

@anirban99
Last active April 4, 2021 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anirban99/b8e4a261ee76a8e77a61efac0473de67 to your computer and use it in GitHub Desktop.
Save anirban99/b8e4a261ee76a8e77a61efac0473de67 to your computer and use it in GitHub Desktop.
@Entity
@Table(name = "employee")
data class Employee (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val id: Long?,
@Column(name = "user_name", unique = true, nullable = false)
val userName: String,
@Column(name = "first_name", nullable = false)
val firstName: String,
@Column(name = "middle_name", nullable = true)
val middleName: String?,
@Column(name = "last_name", nullable = false)
val lastName: String,
@Column(name = "email_address", nullable = false)
val emailId: String,
@Column(name = "day_of_birth", nullable = false)
val dayOfBirth: LocalDate
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment