package com.yonge.cooleshow.biz.dal.dto.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.biz.dal.enums.PeriodEnum;
import com.yonge.cooleshow.biz.dal.enums.TimeTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: liweifan
 * @Data: 2022/4/7 15:07
 */
@ApiModel(value = "TotalReq对象", description = "统计查询对象")
public class TotalReq {
    @ApiModelProperty("用户id ")
    private Long userId;
    @NotNull(message = "时间类型不能为空")
    @ApiModelProperty("时间类型 MONTH、月度  YEAR、年度")
    private PeriodEnum timeType;
    @NotBlank(message = "时间不能为空")
    @ApiModelProperty("时间 yyyy | yyyy-MM")
    private String dateTime;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public PeriodEnum getTimeType() {
        return timeType;
    }

    public void setTimeType(PeriodEnum timeType) {
        this.timeType = timeType;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }
}
