package com.bonus.canteen.core.customer.vo;

import com.bonus.canteen.core.common.utils.SysUtil;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.time.LocalDate;
import java.time.LocalDateTime;

@ApiModel("组织机构表")
@Data
public class CustOrgVO {
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("机构id")
   private Long orgId;
   @ApiModelProperty("机构全路径id")
   private String orgFullId;
   @ApiModelProperty("机构编号")
   private String orgNum;
   @ApiModelProperty("机构名称")
   private String orgName;
   @ApiModelProperty("机构全称")
   private String orgFullName;
   @ApiModelProperty("机构级别")
   private Integer orgLevel;
   @ApiModelProperty("上级机构id")
   private Long superId;
   @ApiModelProperty("机构负责人")
   private String orgHead;
   @ApiModelProperty("组织负责人id（cust_id）")
   private Long orgHeadId;
   @ApiModelProperty("人员编号")
   private String custNum;
   @ApiModelProperty("人员姓名")
   private @NotBlank(
   message = "人员姓名不能为空"
) String custName;
   @ApiModelProperty("机构电话")
   private String orgTel;
   @ApiModelProperty("有效截止日期")
   private LocalDate endDate;
   @ApiModelProperty("就餐地（为新增人员提供默认值）")
   private JsonNode diningPlace;
   @ApiModelProperty("备注描述")
   private String remarks;
   @ApiModelProperty("是否删除")
   private Integer ifDel;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ApiModelProperty("节点状态：1全选；2半选")
   private Integer halfSelect;
   @ApiModelProperty("排序号")
   private Integer sort;
   @ApiModelProperty("组织图片")
   private String picture;
   @ApiModelProperty("人员数量（包含子部门）")
   private Integer customerNum;
   @ApiModelProperty("组织是否过期")
   private boolean expires;

   public String getPicture() {
      return SysUtil.getCutFileUrl(this.picture);
   }

   public Long getId() {
      return this.id;
   }

   public Long getOrgId() {
      return this.orgId;
   }

   public String getOrgFullId() {
      return this.orgFullId;
   }

   public String getOrgNum() {
      return this.orgNum;
   }

   public String getOrgName() {
      return this.orgName;
   }

   public String getOrgFullName() {
      return this.orgFullName;
   }

   public Integer getOrgLevel() {
      return this.orgLevel;
   }

   public Long getSuperId() {
      return this.superId;
   }

   public String getOrgHead() {
      return this.orgHead;
   }

   public Long getOrgHeadId() {
      return this.orgHeadId;
   }

   public String getCustNum() {
      return this.custNum;
   }

   public String getCustName() {
      return this.custName;
   }

   public String getOrgTel() {
      return this.orgTel;
   }

   public LocalDate getEndDate() {
      return this.endDate;
   }

   public JsonNode getDiningPlace() {
      return this.diningPlace;
   }

   public String getRemarks() {
      return this.remarks;
   }

   public Integer getIfDel() {
      return this.ifDel;
   }

   public Integer getRevision() {
      return this.revision;
   }

   public String getCrby() {
      return this.crby;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   public Integer getHalfSelect() {
      return this.halfSelect;
   }

   public Integer getSort() {
      return this.sort;
   }

   public Integer getCustomerNum() {
      return this.customerNum;
   }

   public boolean isExpires() {
      return this.expires;
   }

   public void setId(final Long id) {
      this.id = id;
   }

   public void setOrgId(final Long orgId) {
      this.orgId = orgId;
   }

   public void setOrgFullId(final String orgFullId) {
      this.orgFullId = orgFullId;
   }

   public void setOrgNum(final String orgNum) {
      this.orgNum = orgNum;
   }

   public void setOrgName(final String orgName) {
      this.orgName = orgName;
   }

   public void setOrgFullName(final String orgFullName) {
      this.orgFullName = orgFullName;
   }

   public void setOrgLevel(final Integer orgLevel) {
      this.orgLevel = orgLevel;
   }

   public void setSuperId(final Long superId) {
      this.superId = superId;
   }

   public void setOrgHead(final String orgHead) {
      this.orgHead = orgHead;
   }

   public void setOrgHeadId(final Long orgHeadId) {
      this.orgHeadId = orgHeadId;
   }

   public void setCustNum(final String custNum) {
      this.custNum = custNum;
   }

   public void setCustName(final String custName) {
      this.custName = custName;
   }

   public void setOrgTel(final String orgTel) {
      this.orgTel = orgTel;
   }

   public void setEndDate(final LocalDate endDate) {
      this.endDate = endDate;
   }

   public void setDiningPlace(final JsonNode diningPlace) {
      this.diningPlace = diningPlace;
   }

   public void setRemarks(final String remarks) {
      this.remarks = remarks;
   }

   public void setIfDel(final Integer ifDel) {
      this.ifDel = ifDel;
   }

   public void setRevision(final Integer revision) {
      this.revision = revision;
   }

   public void setCrby(final String crby) {
      this.crby = crby;
   }

   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

   public void setUpby(final String upby) {
      this.upby = upby;
   }

   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   public void setHalfSelect(final Integer halfSelect) {
      this.halfSelect = halfSelect;
   }

   public void setSort(final Integer sort) {
      this.sort = sort;
   }

   public void setPicture(final String picture) {
      this.picture = picture;
   }

   public void setCustomerNum(final Integer customerNum) {
      this.customerNum = customerNum;
   }

   public void setExpires(final boolean expires) {
      this.expires = expires;
   }




}
