package org.kitchenstudio.entity;

import java.util.List;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

@Entity
public class Person {

	@Id
	@GeneratedValue
	private Long id;

	private String name;

	@OneToMany(orphanRemoval = true)
	@JoinColumn(name = "PERSON_ID")
	// join column is in table for Order
	private List<Number> numbers;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Number> getNumbers() {
		return numbers;
	}

	public void setNumbers(List<Number> numbers) {
		this.numbers = numbers;
	}
}

@@ -54,30 +54,8 @@
 ist;
-%0Aimport java.util.Set;
 %0A%0Aim
@@ -396,73 +396,33 @@
 %22)%0A%09
-// join column is in table for Order%0A%09private List%3CNumber%3E number
+private List%3CPhone%3E phone
 s;%0A%0A
@@ -634,25 +634,23 @@
 ist%3C
-Number%3E getNumber
+Phone%3E getPhone
 s() 
@@ -660,22 +660,21 @@
 %09return 
-number
+phone
 s;%0A%09%7D%0A%0A%09
@@ -692,67 +692,63 @@
  set
-Number
+Phone
 s(List%3C
-Number%3E numbers) %7B%0A%09%09this.numbers = number
+Phone%3E phones) %7B%0A%09%09this.phones = phone
 s;%0A%09%7D%0A
+%0A
 %7D%0A

添加人员基本类，预期将员工、管理员、司机、其他人设为人员基本类之下