/*
* ShouGouZiGeVO.java
* 版权所有 © 2011-2017 北京神舟良实信息技术有限公司
* Copyright © 2011-2017 All Rights Reserved    京ICP备13013562号
*  created by lipenghe with LAPTOP-DPSC399A
*/
package com.unis.base.common.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.unis.common.vo.groups.InsertGroup;
import com.unis.common.vo.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * TY_SHOUGOUZIGE-真收购资格表
 * @author lipenghe at 
 */
@ApiModel(value = "TY_SHOUGOUZIGE:真收购资格表-ShouGouZiGeVO", description= "A")
@Data
@Table(name= "TY_SHOUGOUZIGE")
public class ShouGouZiGeVO extends BaseEntity implements Serializable{

    @NotNull(message = "收购资格id不能为空",groups ={UpdateGroup.class})
    @ApiModelProperty(value = "收购资格id#<主键><唯一><检索><非空>", notes = "收购资格id", example = "0")
    @JsonSerialize(using = ToStringSerializer.class)
    @Id
    @Column(name= "SGZGID",length= 20,precision= 20, scale= 0, columnDefinition = "DECIMAL")
    private Long sgzgid;

    @Length(max= 50, message= "营业执照注册号最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "营业执照注册号#<检索>", notes = "营业执照注册号", example = "营业执照注册号#<检索>")
    @Column(name= "YYZZZCH", length= 50, columnDefinition = "VARCHAR")
    private String yyzzzch;

    @NotBlank(message = "统一社会信用代码不能为空",groups ={InsertGroup.class})
    @Length(max= 50, message= "统一社会信用代码最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "统一社会信用代码#<检索><非空>", notes = "统一社会信用代码", example = "统一社会信用代码#<检索><非空>")
    @Column(name= "TYSHXYDM", length= 50, columnDefinition = "VARCHAR")
    private String tyshxydm;

    @NotBlank(message = "市场主体名称不能为空",groups ={InsertGroup.class})
    @Length(max= 100, message= "市场主体名称最大为100字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "市场主体名称#<检索><非空>", notes = "市场主体名称", example = "市场主体名称#<检索><非空>")
    @Column(name= "SCZTMC", length= 100, columnDefinition = "VARCHAR")
    private String scztmc;

    @Length(max= 50, message= "组织机构代码最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "组织机构代码#<检索>", notes = "组织机构代码", example = "组织机构代码#<检索>")
    @Column(name= "ZZJGDM", length= 50, columnDefinition = "VARCHAR")
    private String zzjgdm;

    @Length(max= 50, message= "许可文件名称最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "许可文件名称", notes = "许可文件名称", example = "许可文件名称")
    @Column(name= "XKWJMC", length= 50, columnDefinition = "VARCHAR")
    private String xkwjmc;

    @NotBlank(message = "许可文件编号不能为空",groups ={InsertGroup.class})
    @Length(max= 50, message= "许可文件编号最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "许可文件编号#<非空>", notes = "许可文件编号", example = "许可文件编号#<非空>")
    @Column(name= "XKWJBH", length= 50, columnDefinition = "VARCHAR")
    private String xkwjbh;

    @Length(max= 200, message= "许可内容最大为200字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "许可内容", notes = "许可内容", example = "许可内容")
    @Column(name= "XKNR", length= 200, columnDefinition = "VARCHAR")
    private String xknr;

    @ApiModelProperty(value = "有效期起#<检索>", notes = "有效期自", example = "0")
    @Column(name= "YXQQ", length= 20, precision= 20, scale= 0, columnDefinition = "DECIMAL")
    private Long yxqq;

    @ApiModelProperty(value = "有效期止#<检索>", notes = "有效期至", example = "0")
    @Column(name= "YXQZ", length= 20, precision= 20, scale= 0, columnDefinition = "DECIMAL")
    private Long yxqz;

    @Length(max= 50, message= "许可机关编码最大为50字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "许可机关编码#<检索>", notes = "许可机关编码", example = "许可机关编码#<检索>")
    @Column(name= "XKJGBM", length= 50, columnDefinition = "VARCHAR")
    private String xkjgbm;

    @Length(max= 200, message= "许可机关编码名称最大为200字符", groups ={UpdateGroup.class, InsertGroup.class})
    @ApiModelProperty(value = "许可机关编码名称#<检索>", notes = "许可机关", example = "许可机关编码名称#<检索>")
    @Column(name= "XKJGBMMC", length= 200, columnDefinition = "VARCHAR")
    private String xkjgbmmc;

    @ApiModelProperty(value = "有效状态#<检索>1有效0无效", notes = "许可证状态", example = "1")
    @Column(name= "YXZT", length= 5, precision= 5, scale= 0, columnDefinition = "DECIMAL")
    private Integer yxzt;

    @ApiModelProperty(value = "数据版本", notes = "数据版本", example = "1")
    @Column(name= "VERSION", length= 5, precision= 5, scale= 0, columnDefinition = "DECIMAL")
    private Integer version;

    public ShouGouZiGeVO(){
        super();
    }

    private CompanyNewVO companyNewVO;

    @ApiModelProperty(hidden = true)
    private List<ShouGouZiGeVO> shouGouZiGeVOList;

    @ApiModelProperty(value = "企业性质", notes = "企业性质", example = "企业性质")
    private String qyxz;
}