package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 会员充值订单表
 *
 * @author 科技小王子
 * @since 2025-01-11 10:45:12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopRechargeOrder对象", description = "会员充值订单表")
public class ShopRechargeOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "订单ID")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

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

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

    @Schema(description = "充值方式(10自定义金额 20套餐充值)")
    private Integer rechargeType;

    @Schema(description = "机构id")
    private Integer organizationId;

    @Schema(description = "充值套餐ID")
    private Integer planId;

    @Schema(description = "用户支付金额")
    private BigDecimal payPrice;

    @Schema(description = "赠送金额")
    private BigDecimal giftMoney;

    @Schema(description = "实际到账金额")
    private BigDecimal actualMoney;

    @Schema(description = "用户可用余额")
    private BigDecimal balance;

    @Schema(description = "支付方式（微信/支付宝）")
    private String payMethod;

    @Schema(description = "支付状态(10待支付 20已支付)")
    private Integer payStatus;

    @Schema(description = "付款时间")
    private Integer payTime;

    @Schema(description = "第三方交易记录ID")
    private Integer tradeId;

    @Schema(description = "来源客户端 (APP、H5、小程序等)")
    private String platform;

    @Schema(description = "所属门店ID")
    private Integer shopId;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "商户编码")
    private String merchantCode;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
