package com.yida.data.device.vo.telephone;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.converter.LocalDateTimeConverter;
import com.yida.data.device.convertor.telephone.MoneyConvertor;
import com.yida.data.device.convertor.telephone.OrderStatusConvertor;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
public class OrderPageVO {
    @ExcelProperty(value = "ID", index = 0)
    private Long id;

    @ApiModelProperty("学生姓名")
    @ExcelProperty(value = "学生姓名", index = 1)
    private String studentName;

    @ApiModelProperty("学生ic卡号")
    @ExcelProperty(value = "学生IC卡号", index = 2)
    private String cardNo;

    @ApiModelProperty("充值金额")
    @ExcelProperty(value = "充值金额", index = 3, converter = MoneyConvertor.class)
    private Double money;

    @ApiModelProperty("支付手机号")
    @ExcelIgnore
    private String payPhone;

    @ApiModelProperty("支付人名称")
    @ExcelIgnore
    private String payRelation;

    @ApiModelProperty("充后余额")
    @ExcelProperty(value = "充后余额", index = 5, converter = MoneyConvertor.class)
    private Double afterBalance;

    @ApiModelProperty("订单状态 ：0：待付款\\r\\n1：付款中\\r\\n2：交易完成（正常支付成功）\\r\\n3：待退款\\r\\n4：交易关闭（a:超时未支付,b:退款成功")
    @ExcelProperty(value = "订单状态", index = 6, converter = OrderStatusConvertor.class)
    private Integer orderStatus;

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

    @ApiModelProperty("后台适用")
    @ExcelProperty(value = "支付人", index = 4)
    private String payPerson;
}
