package garbagetown.domain.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by yu-umezawa on 2015/10/15.
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "reserve")
public class Reserve implements Serializable {

    @Id
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "reserve_no")
    private String reserveNo;

    @NotNull
    @Column(name = "reserved_day")
    @Temporal(TemporalType.DATE)
    private Date reservedDay;

    @NotNull
    @Column(name = "adult_count")
    private int adultCount;

    @NotNull
    @Column(name = "child_count")
    private int childCount;

    @NotNull
    @Column(name = "transfer")
    private String transfer;

    @NotNull
    @Column(name = "sum_price")
    private int sumPrice;

    @Size(max = 1000)
    @Column(name = "remarks")
    private String remarks;

    @JoinColumn(name = "customer_code", referencedColumnName = "customer_code")
    @ManyToOne(fetch = FetchType.LAZY)
    private Customer customer;

    @JoinColumn(name = "tour_code", referencedColumnName = "tour_code")
    @ManyToOne(fetch = FetchType.LAZY)
    private Tourinfo tourinfo;
}
@@ -404,16 +404,119 @@
 able %7B%0A%0A
+    public static final String TRANSFERED = %221%22;%0A    public static final String NOT_TRANSFERED = %220%22;%0A%0A
     @Id%0A

add constants represents the transfer state