package com.zsElectric.boot.business.model.form;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import jakarta.validation.constraints.*;

/**
 * 用户支付订单信息表单对象
 *
 * @author zsElectric
 * @since 2025-12-16 16:25
 */
@Getter
@Setter
@Schema(description = "用户支付订单信息表单对象")
public class UserOrderInfoForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @NotNull(message = "主键ID不能为空")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "用户openId")
    private String openid;

    @Schema(description = "订单编号")
    @Size(max = 128, message = "订单编号长度不能超过128个字符")
    private String orderNo;

    @Schema(description = "订单金额")
    private BigDecimal orderMoney;

    @Schema(description = "订单剩余金额")
    private BigDecimal lastMoney;

    @Schema(description = "支付时间")
    @Size(max = 20, message = "支付时间长度不能超过20个字符")
    private LocalDateTime payTime;

    @Schema(description = "支付档ID")
    private Long levelId;

    @Schema(description = "第三方支付单号")
    @Size(max = 50, message = "第三方支付单号长度不能超过50个字符")
    private String outTradeNo;

    @Schema(description = "订单状态 1 待支付  2 已支付 3 已取消 4 已退款")
    private Integer orderStatus;

    @Schema(description = "订单类型 1 微信 2 第三方")
    private Integer orderType;

    @Schema(description = "微信支付流水号")
    private String transactionId;

    @Schema(description = "退款金额")
    private BigDecimal refundMoney;

    @Schema(description = "退款时间")
    @Size(max = 20, message = "退款时间长度不能超过20个字符")
    private LocalDateTime refundTime;

    @Schema(description = "备注")
    @Size(max = 255, message = "备注长度不能超过255个字符")
    private String remark;

    @Schema(description = "乐观锁")
    private Integer version;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除（0-未删除 1-已删除）")
    private Integer isDeleted;


}
