package com.seer.teach.mp.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.seer.teach.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 模板消息表
 * </p>
 *
 * @author Wang
 * @since 2025-08-09 15:07:09
 */
@Getter
@Setter
@TableName("mp_template_message")
@Schema(name = "MpTemplateMessageEntity对象", description = "模板消息表")
public class MpTemplateMessageEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public static final Integer TEMPLATE_MESSAGE_STATUS_SUCCESS = 1;

    public static final Integer TEMPLATE_MESSAGE_STATUS_FAILED = 2;

    @Schema(description = "微信公众号 appid")
    @TableField("user_id")
    private Integer userId;

    @Schema(description = "用户ID")
    @TableField("app_id")
    private String appId;

    @Schema(description = "消息ID")
    @TableField("msg_id")
    private String msgId;

    @Schema(description = "业务Id")
    @TableField("business_id")
    private String businessId;

    @Schema(description = "微信openid")
    @TableField("openid")
    private String openid;

    @Schema(description = "微信模板ID")
    @TableField("template_id")
    private String templateId;

    @Schema(description = "跳转链接")
    @TableField("url")
    private String url;

    @Schema(description = "模板数据（JSON格式）")
    @TableField("`data`")
    private String data;

    @Schema(description = "发送状态：1-发送成功，2-发送失败")
    @TableField("`status`")
    private Integer status;

    @TableField("error_msg")
    @Schema(description = "错误信息")
    private String errorMsg;

}
