add MemberAsset intial input

This commit is contained in:
uwe 2017-04-09 13:48:16 +02:00
parent fbc5fb03aa
commit 5d950947ee
2 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,11 @@
package de.hsadmin.bo.customer;
public enum AssetAction {
PAYMENT,
PAYBACK,
ADOPTION,
HANDOVER,
LOSS,
CLEARING,
PRESCRIPTION
}

View File

@ -0,0 +1,97 @@
package de.hsadmin.bo.customer;
import static javax.persistence.FetchType.EAGER;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
@Entity
@Table(name = "member_asset")
public class MemberAsset implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "member_share_id", columnDefinition = "integer")
private long id;
@JoinColumn(name = "bp_id", columnDefinition = "integer", nullable = false)
@ManyToOne(fetch = EAGER)
private Customer customer;
@Column(name = "date", columnDefinition = "date", nullable = false)
@Temporal(javax.persistence.TemporalType.DATE)
private Date date;
@Column(name="action", nullable = false)
private ShareAction action;
@Column(name="amount", nullable = false)
private BigDecimal amount;
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
@Column(name="comment", nullable = true)
private String comment;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public ShareAction getAction() {
return action;
}
public void setAction(ShareAction action) {
this.action = action;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}