Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created July 1, 2019 14:19
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 recursivecodes/0c32c021966b47a569c85b926ed01dba to your computer and use it in GitHub Desktop.
Save recursivecodes/0c32c021966b47a569c85b926ed01dba to your computer and use it in GitHub Desktop.
User.java
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "id", unique = true, nullable = false)
private String id;
@Column(name = "first_name")
@NotNull
@Size(max=50)
private String firstName;
@Column(name = "last_name")
@NotNull
@Size(max=50)
private String lastName;
@Column(name = "username")
@NotNull
@Size(max=50)
private String username;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
@Column(name = "created_on")
private Date createdOn = new Date();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment