add more components to contact model
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user