package com.yida.data.mall.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.enums.BillStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 账单详情返回数据
 *
 * @author ZYJ
 * @date 2021/12/24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "BillInfoVO", description = "账单详情返回数据")
public class BillInfoVO implements Serializable {

    private static final long serialVersionUID = 6219427469866111783L;

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "学校名称")
    private String deptName;

    @ApiModelProperty("创建人名称")
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "缴费单标题")
    private String billTitle;

    @ApiModelProperty(value = "缴费说明")
    private String billInstruction;

    @ApiModelProperty(value = "缴费单开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime billStartDate;

    @ApiModelProperty(value = "缴费单结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime billEndDate;

    @ApiModelProperty(value = "H5页面二维码地址")
    private String qrCodeAddress;

    /**
     * {@link BillStatusEnum}
     */
    @ApiModelProperty("启用状态. -1:未开始,0:停用,1:启用")
    private Integer enableStatus;

    @ApiModelProperty(value = "缴费项目列表")
    private List<BillItemInfoVO> itemList;

    @NotEmpty
    @ApiModelProperty(value = "选择的学生列表")
    private List<BillStudentInfoVO> achieveList;
}