package com.czg.order.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 第三方商户进件 实体类。
 *
 * @author Administrator
 * @since 2025-02-11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_shop_merchant")
public class ShopMerchant implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    private Long id;
    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * poly 聚合(支付平台) native 原生(wx/ali 原生)
     * {@link com.czg.constant.PayChannelCst}
     */
    private String channel;

    /**
     * 聚合支付商户
     * native 必填 对应 tb_shop_direct_merchant 的 shopId
     */
    private Long relatedId;

    /**
     * 微信appid
     */
    private String wechatAppId;
    /**
     * 支付宝appid
     */
    private String alipayAppId;

    /**
     * 聚合支付参数
     */
    private String polyPayJson;
    /**
     * 原生支付参数
     */
    private String nativePayJson;

    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;
}
