package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 支付方式
 *
 * @author 科技小王子
 * @since 2024-05-11 12:39:11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Payment对象", description = "支付方式")
@TableName("sys_payment")
public class Payment implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "支付方式")
    private String name;

    @Schema(description = "类型")
    private Integer type;

    @Schema(description = "标识")
    private String code;

    @Schema(description = "支付图标")
    private String image;

    @Schema(description = "微信商户号类型 1普通商户2子商户")
    private Integer wechatType;

    @Schema(description = "应用ID")
    private String appId;

    @Schema(description = "商户号")
    private String mchId;

    @Schema(description = "设置APIv3密钥")
    private String apiKey;

    @Schema(description = "证书文件 (CERT)")
    private String apiclientCert;

    @Schema(description = "证书文件 (KEY)")
    private String apiclientKey;

    @Schema(description = "公钥文件 (KEY)")
    private String pubKey;

    @Schema(description = "公钥ID")
    private String pubKeyId;

    @Schema(description = "商户证书序列号")
    private String merchantSerialNumber;

    @Schema(description = "支付结果通知")
    private String notifyUrl;

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

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

    @Schema(description = "状态, 0未启用, 1启用")
    private Boolean status;

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

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

    @Schema(description = "注册时间")
    @JsonIgnore  // 缓存时忽略此字段
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonIgnore  // 缓存时忽略此字段
    private LocalDateTime updateTime;

}
