source: Git/src/main/java/com/wediscussmovies/project/model/User.java@ 7fafead

main
Last change on this file since 7fafead was 7fafead, checked in by Test <matonikolov77@…>, 2 years ago

Resolving models

  • Property mode set to 100644
File size: 841 bytes
Line 
1package com.wediscussmovies.project.model;
2
3import javax.persistence.*;
4import java.util.Collection;
5import java.util.List;
6
7@Entity
8@Table(name = "users", schema = "project", catalog = "db_202122z_va_prj_wediscussmovies")
9public class User {
10 @GeneratedValue(strategy = GenerationType.IDENTITY)
11 @Id
12 @Column(name = "user_id")
13 private Long userId;
14
15 private String username;
16
17 private String name;
18
19 private String surname;
20
21 private String email;
22
23 private String password;
24
25 @ManyToMany
26 private List<Movie> movies;
27
28
29
30
31 public User(String username, String name, String surname, String email, String password) {
32 this.username = username;
33 this.name = name;
34 this.surname = surname;
35 this.email = email;
36 this.password = password;
37 }
38
39 public User() {
40 }
41}
Note: See TracBrowser for help on using the repository browser.