package cn.newfeifan.mall.module.distri.controller.admin.usertopupconsumptionpointsorder.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 用户充值消费分订单新增/修改 Request VO")
@Data
public class UserTopUpConsumptionPointsOrderSaveReqVO {

    @Schema(description = "用户充值消费分订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3828")
    private Long id;

    @Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "订单流水号不能为空")
    private String no;

    @Schema(description = "订单来源终端", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单来源终端不能为空")
    private Integer terminal;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29707")
    @NotNull(message = "用户编号不能为空")
    private Long userId;

    @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "用户 IP不能为空")
    private String userIp;

    @Schema(description = "商品标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "商品标题不能为空")
    private String subject;

    @Schema(description = "充值消费分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "充值消费分不能为空")
    private Long topUpConsumptionPoints;

    @Schema(description = "到账消费分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "到账消费分不能为空")
    private Long practicalConsumptionPoints;

    @Schema(description = "用户名", example = "李四")
    private String userName;

    @Schema(description = "支付订单编号", example = "9840")
    private Long payOrderId;

    @Schema(description = "是否已支付：[0:未支付 1:已经支付过]", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "是否已支付：[0:未支付 1:已经支付过]不能为空")
    private Boolean payStatus;

    @Schema(description = "订单支付时间")
    private LocalDateTime payTime;

    @Schema(description = "支付成功的支付渠道")
    private String payChannelCode;

    @Schema(description = "订单完成时间")
    private LocalDateTime finishTime;

    @Schema(description = "订单取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "应付金额（总），单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "5880")
    @NotNull(message = "应付金额（总），单位：分不能为空")
    private Integer payPrice;

    @Schema(description = "计算百分比模板")
    private String percentTemplate;

}