package com.bonus.canteen.core.order.common.vo;

import cn.hutool.core.date.LocalDateTimeUtil;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bonus.canteen.core.common.encrypt.HandleType;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptDataProcess;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptField;
import com.bonus.canteen.core.common.utils.CustomLocalDateTimeConverter;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.fasterxml.jackson.databind.JsonNode;

import java.time.LocalDate;
import java.time.LocalDateTime;

@LeNiuDecryptDataProcess
public class OrderPreBookVO {
   @ExcelIgnore
   private Long preBookId;
   @ExcelIgnore
   private Integer preBookType;
   @ExcelIgnore
   private Integer orderType;
   @ExcelIgnore
   private LocalDate orderDate;
   @ExcelIgnore
   private String orderMonth;
   @ExcelProperty(
      value = {"预报时间"},
      order = 5,
      converter = CustomLocalDateTimeConverter.class
   )
   private LocalDateTime submitTime;
   @ExcelIgnore
   private Long custId;
   @LeNiuDecryptField
   @ExcelProperty(
      value = {"用户姓名"},
      order = 2
   )
   private String custName;
   @ExcelIgnore
   private JsonNode extParam;
   @ExcelProperty(
      value = {"用户编号"},
      order = 1
   )
   private String custNum;
   @LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
   @ExcelProperty(
      value = {"用户手机号"},
      order = 3
   )
   private String mobile;
   @ExcelProperty(
      value = {"组织名称"},
      order = 4
   )
   private String orgFullName;
   @ExcelIgnore
   private String custPhotoUrl;
   @ExcelIgnore
   private Integer psnType;
   @ExcelIgnore
   private String psnTypeName;

   public String getOrderMonth() {
      return LocalDateTimeUtil.format(this.orderDate, "yyyy-MM");
   }

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

   public Long getPreBookId() {
      return this.preBookId;
   }

   public Integer getPreBookType() {
      return this.preBookType;
   }

   public Integer getOrderType() {
      return this.orderType;
   }

   public LocalDate getOrderDate() {
      return this.orderDate;
   }

   public LocalDateTime getSubmitTime() {
      return this.submitTime;
   }

   public Long getCustId() {
      return this.custId;
   }

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

   public JsonNode getExtParam() {
      return this.extParam;
   }

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

   public String getMobile() {
      return this.mobile;
   }

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

   public Integer getPsnType() {
      return this.psnType;
   }

   public String getPsnTypeName() {
      return this.psnTypeName;
   }

   public void setPreBookId(final Long preBookId) {
      this.preBookId = preBookId;
   }

   public void setPreBookType(final Integer preBookType) {
      this.preBookType = preBookType;
   }

   public void setOrderType(final Integer orderType) {
      this.orderType = orderType;
   }

   public void setOrderDate(final LocalDate orderDate) {
      this.orderDate = orderDate;
   }

   public void setOrderMonth(final String orderMonth) {
      this.orderMonth = orderMonth;
   }

   public void setSubmitTime(final LocalDateTime submitTime) {
      this.submitTime = submitTime;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

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

   public void setExtParam(final JsonNode extParam) {
      this.extParam = extParam;
   }

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

   public void setMobile(final String mobile) {
      this.mobile = mobile;
   }

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

   public void setCustPhotoUrl(final String custPhotoUrl) {
      this.custPhotoUrl = custPhotoUrl;
   }

   public void setPsnType(final Integer psnType) {
      this.psnType = psnType;
   }

   public void setPsnTypeName(final String psnTypeName) {
      this.psnTypeName = psnTypeName;
   }

}
