39f6134cd1b75b3117ff8853428b09f856a03563.svn-base 2.06 KB
/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.reg.entity.bus;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.xml.JaxbDateAdapter;

/**
 * 收件信息(主子表)维护Entity
 * @author xuyg
 * @version 2015-11-24
 */
public class RegBusSjmain extends DataEntity<RegBusSjmain> {
	
	private static final long serialVersionUID = 1L;
	private String ywh;		// 业务号
	private String ysdm;		// 要素代码
	private Date sjsj;		// 收件时间
	private String bz;		// 备注
	private List<RegBusSjchild> regBusSjchildList = Lists.newArrayList();		// 子表列表
	
	public RegBusSjmain() {
		super();
	}

	public RegBusSjmain(String id){
		super(id);
	}

	@Length(min=0, max=20, message="业务号长度必须介于 0 和 20 之间")
	public String getYwh() {
		return ywh;
	}

	public void setYwh(String ywh) {
		this.ywh = ywh;
	}
	
	@Length(min=0, max=10, message="要素代码长度必须介于 0 和 10 之间")
	public String getYsdm() {
		return ysdm;
	}

	public void setYsdm(String ysdm) {
		this.ysdm = ysdm;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="收件时间不能为空")
	@XmlJavaTypeAdapter(JaxbDateAdapter.class)
	public Date getSjsj() {
		return sjsj;
	}

	public void setSjsj(Date sjsj) {
		this.sjsj = sjsj;
	}
	
	@Length(min=0, max=300, message="备注长度必须介于 0 和 300 之间")
	public String getBz() {
		return bz;
	}

	public void setBz(String bz) {
		this.bz = bz;
	}
	
	public List<RegBusSjchild> getRegBusSjchildList() {
		return regBusSjchildList;
	}

	public void setRegBusSjchildList(List<RegBusSjchild> regBusSjchildList) {
		this.regBusSjchildList = regBusSjchildList;
	}
}