package org.jeecg.modules.system.app.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.jeecg.modules.app.dto.PageDTO;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Schema(description="订单分页表单对象")
public class AppOrderPageForm extends PageDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "手机号码")
    private String userPhone;

    @Schema(description = "订单编号")
    private String orderCode;

    @Schema(description = "部门编码")
    private String orgCode;

    @Schema(description = "订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消")
    private Integer orderStatus;

    @Schema(description = "售后状态 0-暂无售后 1-退款中 2-已退款")
    private Integer afterSaleStatus;

    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
