package com.inzyme.p2p.test; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import org.hibernate.annotations.GenericGenerator; import org.inzy.framework.core.common.entity.IdEntity; import com.inzyme.p2p.finance.transcation.entity.TranscationEntity; @Entity @Table(name = "test_account", schema = "") public class TestEntity { private String id; private String account; private String host; private String type; private String accountname; private String money; private String state; private String note; private List<TradeEntity> trade = new ArrayList<TradeEntity>(); @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "testentity") public List<TradeEntity> getTrade() { return trade; } public void setTrade(List<TradeEntity> trade) { this.trade = trade; } @Id @Column(name = "id", nullable = false, length = 32) public String getId() { return id; } public void setId(String id) { this.id = id; } @Column(name = "账号", nullable = true, length = 32) public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } @Column(name = "户主", nullable = true, length = 32) public String getHost() { return host; } public void setHost(String host) { this.host = host; } @Column(name = "账户类型", nullable = true, length = 2) public String getType() { return type; } public void setType(String type) { this.type = type; } @Column(name = "账户名称", nullable = true, length = 50) public String getAccountname() { return accountname; } public void setAccountname(String accountname) { this.accountname = accountname; } @Column(name = "余额", nullable = true, length = 32) public String getMoney() { return money; } public void setMoney(String money) { this.money = money; } @Column(name = "账户状态", nullable = true, length = 2) public String getState() { return state; } public void setState(String state) { this.state = state; } @Column(name = "备注", nullable = true, length = 32) public String getNote() { return note; } public void setNote(String note) { this.note = note; } }
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。