add more components to contact model

This commit is contained in:
Felix Förtsch
2019-03-31 16:34:47 +02:00
parent af1cdad171
commit 96403edecb
4 changed files with 6 additions and 7 deletions

View File

@@ -26,13 +26,10 @@ import java.util.List;
resolver = ContactIdResolver.class) resolver = ContactIdResolver.class)
public class Contact implements Serializable { public class Contact implements Serializable {
//@Null may well not work here, if the validations are call on update as well as create
//@Null
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
// perhaps we need a @NotBlank here? Are emails obligatory?
@Email(regexp = "^.*@.*\\..*") @Email(regexp = "^.*@.*\\..*")
private String email; private String email;
@@ -51,7 +48,6 @@ public class Contact implements Serializable {
@Digits(integer = 16, fraction = 0) @Digits(integer = 16, fraction = 0)
private String phone; private String phone;
//@NotBlank
@OneToOne @OneToOne
private Address address; private Address address;

View File

@@ -3,11 +3,12 @@ package de.ul.swtp.modules.contactmanagement.contactdetails;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable;
@Entity @Entity
@Table(name = "cm_address") @Table(name = "cm_address")
@Data @Data
public class Address { public class Address implements Serializable {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -3,11 +3,12 @@ package de.ul.swtp.modules.contactmanagement.contactdetails;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable;
@Entity @Entity
@Table(name = "cm_bankdetails") @Table(name = "cm_bankdetails")
@Data @Data
public class BankAccount { public class BankAccount implements Serializable {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -3,11 +3,12 @@ package de.ul.swtp.modules.contactmanagement.contactdetails;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable;
@Entity @Entity
@Table(name = "cm_voluntarydetails") @Table(name = "cm_voluntarydetails")
@Data @Data
public class VoluntaryDetails { public class VoluntaryDetails implements Serializable {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)