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

View File

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

View File

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

View File

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