package com.bonus.core.customer.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bonus.core.common.utils.SysUtil;
import com.bonus.utils.ValidationGroups;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class CustInfoVo {
   @TableId
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("人员id")
   private @NotNull(message = "{customer.id.nonNull}",groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}) Long custId;
   @ApiModelProperty("人员编号")
   private @NotBlank( message = "{customer.num.nonNull}", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}) String custNum;
   @ApiModelProperty("人员姓名")
   private @NotBlank(
   message = "{customer.name.nonNull}",
   groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
) String custName;
   @ApiModelProperty("人员限制id")
   private Integer custLimitId;
   @ApiModelProperty("第三方人员id")
   private String custThirdId;
   @ApiModelProperty("推送到设备上，生成的用户id")
   private String custDeviceId;
   @ApiModelProperty("手机号")
   private String mobile;
   @ApiModelProperty("登录密码")
   private String pwd;
   @ApiModelProperty("身份证号")
   private String idCard;
   @ApiModelProperty("邮箱")
   private String email;
   @ApiModelProperty("性别 1-男 2-女")
   private Integer sex;
   @ApiModelProperty("年龄")
   private Integer age;
   @ApiModelProperty("生日")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate birthday;
   @ApiModelProperty("民族编码")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Integer ethnicityCode;
   @ApiModelProperty("籍贯")
   private String nativePlace;
   @ApiModelProperty("人脸照片地址")
   private String custPhotoUrl;
   @ApiModelProperty("头像地址")
   private String headPortraitUrl;
   @ApiModelProperty("所属组织id")
   private @NotNull(
   message = "{customer.org.nonNull}",
   groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
) Long orgId;
   @ApiModelProperty("机构编号")
   private String orgNum;
   @ApiModelProperty("机构全称")
   private String orgFullName;
   @ApiModelProperty("成本中心id")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Long costCenterId;
   @ApiModelProperty("所属位置")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Long placeId;
   @ApiModelProperty("所属位置名称")
   private String placeFullName;
   @ApiModelProperty("人员类别")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Integer psnType;
   @ApiModelProperty("人员类别名称")
   private String psnTypeName;
   @ApiModelProperty("家庭地址")
   private String homeAddr;
   @ApiModelProperty("QQ")
   private String qq;
   @ApiModelProperty("微信")
   private String wechat;
   @ApiModelProperty("企业微信")
   private String companyWechat;
   @ApiModelProperty("钉钉")
   private String dingtalk;
   @ApiModelProperty("支付宝签约号")
   private String alipayContractNum;
   @ApiModelProperty("支付宝openid")
   private String alipayOpenid;
   @ApiModelProperty("支付宝-企业码-员工id")
   private String entCodeEmpId;
   @ApiModelProperty("微信签约号")
   private String wechatContractNum;
   @ApiModelProperty("微信openid")
   private String wechatOpenid;
   @ApiModelProperty("紧急联系人")
   private String emerContactPerson;
   @ApiModelProperty("紧急联系电话")
   private String emerContactNum;
   @ApiModelProperty("紧急联系人身份证号")
   private String emerContactCard;
   @ApiModelProperty("职位")
   private String job;
   @ApiModelProperty("职位等级")
   private String jobRank;
   @ApiModelProperty("职位级别")
   private String jobLevel;
   @ApiModelProperty("职称")
   private String jobTitle;
   @ApiModelProperty("职称等级")
   private String jobTitleRank;
   @ApiModelProperty("编制")
   private String authStrength;
   @ApiModelProperty("职务")
   private String position;
   @ApiModelProperty("入职日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate entryDate;
   @ApiModelProperty("合同签订日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate signingDate;
   @ApiModelProperty("合同到期日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate expiryDate;
   @ApiModelProperty("人员状态 1-正常 2-注销")
   private Integer custState;
   @ApiModelProperty("点赞调查批次号")
   private Long likeBatch;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @TableField(
      value = "crby",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建人")
   private String crby;
   @TableField(
      value = "crtime",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @TableField(
      value = "upby",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新人")
   private String upby;
   @TableField(
      value = "uptime",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ApiModelProperty("就诊号")
   private String doctorNum;
   @ApiModelProperty("住院号")
   private String hospitalNum;
   @ApiModelProperty("医嘱")
   private String doctorInstruct;
   @ApiModelProperty("住院日期")
   private LocalDateTime hospitalDate;
   @ApiModelProperty("最近下单时间")
   private LocalDateTime orderTime;
   @ApiModelProperty("IOT开通刷脸支持唯一操作流水号")
   private String uniqueId;
   @ApiModelProperty("银行卡号")
   private String bankCardNum;
   @ApiModelProperty("婚姻状态 0-保密 1-未婚 2-已婚")
   private Integer maritalStatus;
   @ApiModelProperty("商家id")
   private Long merchantId;
   @ApiModelProperty("个人钱包余额 单位分")
   private Integer accBal;
   @ApiModelProperty("补贴钱包余额 单位分")
   private Integer subsidy;
   @ApiModelProperty("红包余额")
   private Integer redEnvelope;
   @ApiModelProperty("积分")
   private Integer scope;
   @ApiModelProperty("openid")
   private String openid;
   @ApiModelProperty("来源类型")
   private Integer sourceType;
   @ApiModelProperty("照片地址")
   private String photoUrl;
   @ApiModelProperty("菜品标签id 多个值用,分隔")
   private String labelIds;
   @ApiModelProperty("菜品标签名称 多个值用,分隔")
   private String labelNames;
   @ApiModelProperty("口味id 多个值用,分隔")
   private String tasteIds;
   @ApiModelProperty("口味名称 多个值用,分隔")
   private String tasteNames;
   @ApiModelProperty("身高")
   private BigDecimal height;
   @ApiModelProperty("体重")
   private BigDecimal weight;
   @ApiModelProperty("BMI")
   private BigDecimal bmi;
   @ApiModelProperty("体型")
   private String shape;
   @ApiModelProperty("胸围")
   private BigDecimal bust;
   @ApiModelProperty("腰围")
   private BigDecimal waistline;
   @ApiModelProperty("血糖")
   private BigDecimal bloodSugar;
   @ApiModelProperty("血脂")
   private Integer bloodFat;
   @ApiModelProperty("血压")
   private Integer bloodPressure;
   @ApiModelProperty("尿酸")
   private Integer uricAcid;
   @ApiModelProperty("血压高")
   private BigDecimal bloodPressureHigh;
   @ApiModelProperty("血压低")
   private BigDecimal bloodPressureLow;
   @ApiModelProperty("心率")
   private BigDecimal heartRate;
   @ApiModelProperty("血氧")
   private BigDecimal bloodOxygen;
   @ApiModelProperty("怀孕状态 0-保密 1-未怀孕 2-已怀孕")
   private Integer pregnantStatus;
   @ApiModelProperty("怀孕日期")
   private LocalDate pregnancyDate;
   @ApiModelProperty("慢性病id 多个用,分割")
   private String chronicIds;
   @ApiModelProperty("慢性病名称 多个用,分割")
   private String chronicNames;
   @ApiModelProperty("医嘱")
   private String doctorAdvice;
   @ApiModelProperty("是否住院 1-是 2-否")
   private Integer ifHospitalized;
   @ApiModelProperty("住院日期")
   private LocalDate inpatientDate;
   @ApiModelProperty("住院诊断结果")
   private String inpatientResult;
   @ApiModelProperty("饮食类型")
   private Integer dietType;
   @ApiModelProperty("体重控制")
   private Integer weightControl;
   @ApiModelProperty("劳动强度")
   private Integer labourIntensity;
   @ApiModelProperty("健康状态（1-健康、2-残疾、3-瘫痪）")
   private Integer healthState;
   @ApiModelProperty("过敏源")
   private String allergen;
   @ApiModelProperty("签名")
   private String paySign;
   @ApiModelProperty("签名类型")
   private String signType = "sha1";
   @ApiModelProperty("时间戳")
   private String timeStamp;
   @ApiModelProperty("随机字符串")
   private String nonceStr;
   @ApiModelProperty("用户标志")
   private Integer subscribe;
   @ApiModelProperty("账户余额不足多少提醒")
   private Integer amountNotify;
   @ApiModelProperty("账户有效截止日期")
   private LocalDate accEndDate;
   @ApiModelProperty("卡序列号")
   private String serialNum;
   @ApiModelProperty("卡状态 1-正常 4-挂失")
   private Integer cardStatus;
   @ApiModelProperty("就餐地")
   private JsonNode diningPlace;
   @ApiModelProperty("位置编号")
   private String placeNum;
   @ApiModelProperty("成本中心全称")
   private String costCenterName;

   public String getPhotoUrl() {
      return SysUtil.getCutFileUrl(this.photoUrl);
   }

   public String getCustPhotoUrl() {
      return SysUtil.getCutFileUrl(this.custPhotoUrl);
   }

   public String getHeadPortraitUrl() {
      return SysUtil.getCutFileUrl(this.headPortraitUrl);
   }






}
