一、数据库设计
二、实体类:entity
import com.joyoung.cloud.security.common.validatedGroup.Add;
import com.joyoung.cloud.security.common.validatedGroup.Modify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
/**
* 公司表(SysCompany)实体类
*
* @author yangyuwei
* @since 2019-06-06 13:45:23
*/
@ApiModel(value = "公司类")
@Data
@Accessors(chain = true)
public class SysCompany implements Serializable {
private static final long serialVersionUID = 600959061181555399L;
@ApiModelProperty(value = "主键Id")
@Id
@Null(message = "{add_id}", groups = {Add.class})
@NotNull(message = "{modify_id}", groups = {Modify.class})
private String id;
//上级公司id
@ApiModelProperty(value = "父Id")
private String parentId;
//公司名称
@ApiModelProperty(value = "公司名称")
@NotBlank(message = "{name_null}")
@Pattern(regexp = "^[\\s\\S]{1,20}$", message = "{name_rule}")
private String coName;
//公司简称
@ApiModelProperty(value = "公司简称")
private String coAbbr;
//公司编号
@ApiModelProperty(value = "公司编号")
private String coCode;
//公司地址
@ApiModelProperty(value = "公司地址")
private String coAddr;
//邮编
@ApiModelProperty(value = "邮编")
@Pattern(regexp = "^$|[0-9]{6}$", message = "{zipCode_error}")
private String zipCode;
//法人名称
@ApiModelProperty(value = "法人名称")
private String legalName;
//法定代表人
@ApiModelProperty(value = "法定代表人")
private String legalRep;
//税号
@ApiModelProperty(value = "税号")
private String taxId;
//电话号码("XXX-XXXXXXX"、"XXXX-XXXXXXXX"、"XXX-XXXXXXX"、"XXX-XXXXXXXX"、"XXXXXXX"和"XXXXXXXX)
// @Pattern(regexp = "^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$", message = "请输入正确的电话号码")
@ApiModelProperty(value = "电话号码")
private String tel;
//开户银行名称
@ApiModelProperty(value ="开户银行名称")
private String bankName;
//开户银行账号
@ApiModelProperty(value = "开户银行账号")
private String bankAcct;
//创建人id
private String crtUser;
//创建人名称
private String crtName;
//创建时间
private Date crtTime;
//最后修改人id
private String updUser;
//最后修改人名称
private String updName;
//最后修改时间
private Date updTime;
//备注
private String remark;
//逻辑删除标识:1=删除;0=未删除
private Integer