package com.bonus.core.marketing.v2.dto;

import com.bonus.framework.config.deserializer.TimeDeserializer;
import com.bonus.framework.config.serializer.TimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalTime;
import java.util.List;

@ApiModel("规则内容扩展字段")
public class MarketRuleExtDTO {
   @ApiModelProperty("开始时间")
   @JsonSerialize(
      using = TimeSerializer.HH_MM_SS.class
   )
   @JsonDeserialize(
      using = TimeDeserializer.class
   )
   private LocalTime startTime;
   @ApiModelProperty("结束时间")
   @JsonSerialize(
      using = TimeSerializer.HH_MM_SS.class
   )
   @JsonDeserialize(
      using = TimeDeserializer.class
   )
   private LocalTime endTime;
   @ApiModelProperty("人员类别")
   private List<Integer> psnTypeList;
   @ApiModelProperty("组织id")
   private List<Long> orgIdList;

   public LocalTime getStartTime() {
      return this.startTime;
   }

   public LocalTime getEndTime() {
      return this.endTime;
   }

   public List<Integer> getPsnTypeList() {
      return this.psnTypeList;
   }

   public List<Long> getOrgIdList() {
      return this.orgIdList;
   }

   @JsonDeserialize(
      using = TimeDeserializer.class
   )
   public MarketRuleExtDTO setStartTime(final LocalTime startTime) {
      this.startTime = startTime;
      return this;
   }

   @JsonDeserialize(
      using = TimeDeserializer.class
   )
   public MarketRuleExtDTO setEndTime(final LocalTime endTime) {
      this.endTime = endTime;
      return this;
   }

   public MarketRuleExtDTO setPsnTypeList(final List<Integer> psnTypeList) {
      this.psnTypeList = psnTypeList;
      return this;
   }

   public MarketRuleExtDTO setOrgIdList(final List<Long> orgIdList) {
      this.orgIdList = orgIdList;
      return this;
   }
}
