package com.kexue.skills.entity;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;
import com.kexue.skills.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * (PaymentOrder)实体类
 * 支付订单表，记录用户的支付请求和支付结果
 *
 * @author 王志维
 * @since 2025-02-21 23:01:48
 */
@Data
public class PaymentOrder extends BaseEntity implements Serializable  {
    private static final long serialVersionUID = 1L;

        @Schema(description ="主键ID")
        private Long orderId;

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

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

        @Schema(description ="用户名")
        private String userName;

        @Schema(description ="支付金额")
        private BigDecimal amount;

        @Schema(description ="支付方式：1.微信 2.支付宝")
        private Integer payType;

        @Schema(description ="支付状态：1.待支付 2.已支付 3.支付失败 4.已取消 5.已退款")
        private Integer status;

        @Schema(description ="支付渠道订单号")
        private String channelOrderNo;

        @Schema(description ="微信二维码URL")
        private String codeUrl;

        @Schema(description ="支付宝二维码HTML内容")
        private String qrCode;

        @Schema(description ="商品名称")
        private String productName;

        @Schema(description ="商品描述")
        private String productDesc;

        @Schema(description ="关联业务ID")
        private Long businessId;

        @Schema(description ="业务类型：recharge,purchase_content")
        private String businessType;

        @Schema(description ="支付回调地址")
        private String notifyUrl;

        @Schema(description ="支付成功跳转地址")
        private String returnUrl;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="过期时间")
        private Date expireTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="支付时间")
        private Date payTime;

        @Schema(description ="支付备注")
        private String remark;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="创建时间")
        private Date createTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="更新时间")
        private Date updateTime;

        @Schema(description ="是否删除 ：0 未删除，1已删除")
        private Integer deleteFlag;

        @Schema(description ="创建人")
        private String createBy;

        @Schema(description ="更新人")
        private String updateBy;

}