-een gebruiker kan meerdere bedrijven hebben -manier van afspraken maken veranderd in de backend ivm meerdere bedrijven gebruiker -bedrijven van een gebruiker zijn op te roepen -gebruikers zijn aan een bestaand bedrijf te koppelen via een REST call -email is aangepast op bedrijf en gebruiker
89 lines
1.6 KiB
Java
89 lines
1.6 KiB
Java
package nl.veenm.paypoint.domain;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import jakarta.persistence.*;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
@Entity
|
|
public class Company {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
private String name;
|
|
private String email;
|
|
private String img_href;
|
|
private String address;
|
|
private String postal_code;
|
|
private String city;
|
|
|
|
@ManyToMany(mappedBy = "companies")
|
|
@JsonIgnore
|
|
private Set<AppUser> users = new HashSet<>();
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public String getImg_href() {
|
|
return img_href;
|
|
}
|
|
|
|
public void setImg_href(String img_href) {
|
|
this.img_href = img_href;
|
|
}
|
|
|
|
public String getAddress() {
|
|
return address;
|
|
}
|
|
|
|
public void setAddress(String address) {
|
|
this.address = address;
|
|
}
|
|
|
|
public String getPostal_code() {
|
|
return postal_code;
|
|
}
|
|
|
|
public void setPostal_code(String postal_code) {
|
|
this.postal_code = postal_code;
|
|
}
|
|
|
|
public String getCity() {
|
|
return city;
|
|
}
|
|
|
|
public void setCity(String city) {
|
|
this.city = city;
|
|
}
|
|
|
|
public Set<AppUser> getUsers() {
|
|
return users;
|
|
}
|
|
|
|
public void setUsers(Set<AppUser> users) {
|
|
this.users = users;
|
|
}
|
|
}
|