/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.distribution.comment.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 时间范围参数
 */
@Data
public class RangeTimeParam {

    public RangeTimeParam(){}

    public RangeTimeParam(Date startTime, Date endTime){
        this.startTime=startTime;
        this.endTime=endTime;
    }


    /**
     * 起始时间
     */
    @ApiModelProperty(value = "起始时间",required=true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 起始时间
     */
    @ApiModelProperty(value = "结束时间",required=true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Override
    public String toString() {
        return "RangeTimeParam{" +
                "startTime=" + startTime.toString() +
                ", endTime=" + endTime.toString() +
                '}';
    }
}
