package com.hotwj.platform.pay.domain.bo;

import com.hotwj.platform.pay.domain.PayOrderExtension;
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.*;

/**
 * 支付订单
 * 业务对象 pay_order_extension
 *
 * @author shihongwei
 * @date 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PayOrderExtension.class, reverseConvertGenerate = false)
public class PayOrderExtensionBo extends BaseEntity {

    /**
     * 支付订单编号
     */
    @NotNull(message = "支付订单编号不能为空", groups = {EditGroup.class})
    private Long id;

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

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

    /**
     * 渠道编号
     */
    @NotNull(message = "渠道编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long channelId;

    /**
     * 渠道编码
     */
    @NotBlank(message = "渠道编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String channelCode;

    /**
     * 用户 IP
     */
    @NotBlank(message = "用户 IP不能为空", groups = {AddGroup.class, EditGroup.class})
    private String userIp;

    /**
     * 支付状态
     */
    @NotNull(message = "支付状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long status;

    /**
     * 支付渠道的额外参数
     */
    private String channelExtras;

    /**
     * 渠道调用报错时，错误码
     */
    private String channelErrorCode;

    /**
     * 渠道调用报错时，错误信息
     */
    private String channelErrorMsg;

    /**
     * 支付渠道异步通知的内容
     */
    private String channelNotifyData;

    /**
     * 0=正常, 1=已删除
     */
    private Long isDeleted;


}
