package cane.brothers.circus.domain;

import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "LAYOUTS")
public class CircusLayout extends BaseEntity {

	@OneToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "CIRCUS_ID", unique = true, nullable = false)
	private Circus circus;
	
	public CircusLayout() {
	}

}

@@ -139,17 +139,49 @@
 eToOne;%0A
+import javax.persistence.Column;
 %0A
-
 import j
@@ -261,16 +261,23 @@
 name = %22
+CIRCUS_
 LAYOUTS%22
@@ -476,31 +476,743 @@
 %0A%09%0A%09
-public CircusLayout() %7B
+/**%0A%09 * Circus layout name%0A%09 */%0A%09@Column(name = %22NAME%22, nullable = false, unique = true)%0A%09private String name;%0A%09%0A%09/**%0A%09 * Circus arena capacity%0A%09 */%0A%09private int capacity;%0A%09%0A%09/**%0A%09 * Constructor%0A%09 */%0A%09public CircusLayout() %7B%0A%09%09super();%0A%09%7D%0A%0A%09public CircusLayout(Circus circus, String name, int capacity) %7B%0A%09%09super();%0A%09%09this.circus = circus;%0A%09%09this.name = name;%0A%09%09this.capacity = capacity;%0A%09%7D%0A%0A%09public Circus getCircus() %7B%0A%09%09return circus;%0A%09%7D%0A%0A%09public void setCircus(Circus circus) %7B%0A%09%09this.circus = circus;%0A%09%7D%0A%0A%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%0A%09public int getCapacity() %7B%0A%09%09return capacity;%0A%09%7D%0A%0A%09public void setCapacity(int capacity) %7B%0A%09%09this.capacity = capacity;
 %0A%09%7D%0A

add fields, rename table