package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
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.util.Date;

/**
 * 小程序信息
 *
 * @author 科技小王子
 * @since 2024-07-21 23:03:05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Mp对象", description = "小程序信息")
@TableName("cms_mp")
public class Mp implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "是否主账号")
    private Integer type;

    @Schema(description = "小程序ID")
    private String appId;

    @Schema(description = "小程序密钥")
    private String appSecret;

    @Schema(description = "小程序名称")
    private String mpName;

    @Schema(description = "小程序简称")
    private String shortName;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "小程序码")
    private String mpQrcode;

    @Schema(description = "微信认证")
    private Integer authentication;

    @Schema(description = "主体信息")
    private String companyName;

    @Schema(description = "小程序备案")
    private String icpNo;

    @Schema(description = "登录邮箱")
    private String email;

    @Schema(description = "登录密码")
    private String password;

    @Schema(description = "原始ID")
    private String ghId;

    @Schema(description = "入口页面")
    private String mainPath;

    @Schema(description = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expirationTime;

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

    @Schema(description = "介绍")
    private String comments;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

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

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

    @Schema(description = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "登录凭证")
    @TableField(exist = false)
    private String code;

}
