package org.dromara.work.domain.bo;

import org.dromara.work.domain.TpOrderPay;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单支付记录业务对象 tp_order_pay
 *
 * @author Maosw
 * @date 2025-04-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TpOrderPay.class, reverseConvertGenerate = false)
public class TpOrderPayBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNum;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 用户手机号码
     */
    private String userPhone;

    /**
     * 支付方式 1-拉卡拉  2-余额
     */
    @NotNull(message = "支付方式 1-拉卡拉  2-余额不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer method;

    /**
     * 支付金额
     */
    @NotNull(message = "支付金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 支付状态 1-待支付  2-已支付  3-已失效  4-支付失败
     */
    @NotNull(message = "支付状态 1-待支付  2-已支付  3-已失效  4-支付失败不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 支付订单号
     */
    @NotBlank(message = "支付订单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 第三方支付流水号
     */
    @NotBlank(message = "第三方支付流水号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String transactionId;

    /**
     * 第三方支付原始数据
     */
    private String payerInfo;

    /**
     * 支付有效期
     */
    private Date expireTime;

    /**
     * 类型 1-订单支付  2-余额充值
     */
    private Integer type;

    /**
     * 备注
     */
    private String remark;


}
