package xyz.acmer.entity.user;

/**
 * Created by hypo on 16-2-27.
 */
public class Balance {
}

@@ -29,68 +29,1877 @@
 r;%0A%0A
-/**%0A * Created by hypo on 16-2-27.%0A */%0Apublic class Balance %7B
+import javax.persistence.*;%0Aimport java.util.Date;%0A%0A/**%0A * Created by hypo on 16-2-27.%0A */%0A@Entity%0A@Table(name = %22balance%22)%0Apublic class Balance %7B%0A%0A    private Long id;%0A%0A    /**%0A     * %E5%A2%9E%E5%87%8F%E7%A7%AF%E5%88%86%0A     */%0A    private Integer num;%0A%0A    /**%0A     * %E6%93%8D%E4%BD%9C%E5%90%8E%E4%BD%99%E9%A2%9D%0A     */%0A    private Integer newbalance;%0A%0A    /**%0A     * %E5%A2%9E%E5%87%8F%E5%8E%9F%E5%9B%A0%0A     */%0A    private String reason;%0A%0A    /**%0A     * %E6%93%8D%E4%BD%9C%E6%97%B6%E9%97%B4%0A     */%0A    private Date time;%0A%0A    /**%0A     * %E6%B6%89%E5%8F%8A%E7%94%A8%E6%88%B7%0A     */%0A    private User user;%0A%0A    public Balance() %7B%0A    %7D%0A%0A    public Balance(Integer num, Integer newbalance, String reason, User user) %7B%0A        this.num = num;%0A        this.newbalance = newbalance;%0A        this.reason = reason;%0A        this.time = new Date();%0A        this.user = user;%0A    %7D%0A%0A    @Id%0A    @GeneratedValue%0A    @Column(name = %22id%22)%0A    public Long getId() %7B%0A        return id;%0A    %7D%0A%0A    public void setId(Long id) %7B%0A        this.id = id;%0A    %7D%0A%0A    @Column(name = %22number%22, nullable = false)%0A    public Integer getNum() %7B%0A        return num;%0A    %7D%0A%0A    public void setNum(Integer num) %7B%0A        this.num = num;%0A    %7D%0A%0A    @Column(name = %22new_balance%22, nullable = false)%0A    public Integer getNewbalance() %7B%0A        return newbalance;%0A    %7D%0A%0A    public void setNewbalance(Integer newbalance) %7B%0A        this.newbalance = newbalance;%0A    %7D%0A%0A    @Column(name = %22reason%22, nullable = false, length = 100)%0A    public String getReason() %7B%0A        return reason;%0A    %7D%0A%0A    public void setReason(String reason) %7B%0A        this.reason = reason;%0A    %7D%0A%0A    @Column(name = %22time%22, nullable = false, columnDefinition = %22TIMESTAMP%22)%0A    public Date getTime() %7B%0A        return time;%0A    %7D%0A%0A    public void setTime(Date time) %7B%0A        this.time = time;%0A    %7D%0A%0A    @ManyToOne%0A    @JoinColumn(name = %22user_id%22, nullable = false)%0A    public User getUser() %7B%0A        return user;%0A    %7D%0A%0A    public void setUser(User user) %7B%0A        this.user = user;%0A    %7D
 %0A%7D%0A

add balance