package model

import (
	"pure-admin/global"
	"time"
)

type PlatformAuth struct {
	global.MG_MODEL
	UserID string `json:"user_id" gorm:"type:varchar(60);comment:用户ID"` //用户ID
	Platform
	Status string `json:"status" gorm:"size:1;comment:认证状态 0:未认证 1:已认证 2:认证失败"` //认证状态 0:未认证 1:已认证 2:认证失败
}

type PlatformAuthSimple struct {
	PlatformAuth
	User            UserSimple        `gorm:"-" json:"user"`
	TagRelationDesc []TagRelationDesc `gorm:"-" json:"tag_relation"`
}

type Platform struct {
	Platform     string     `json:"platform"`                           //平台
	PlatformName string     `gorm:"-" json:"platformName"`              //平台名称
	Url          string     `json:"url"`                                //主页地址
	Image        string     `json:"image"`                              //图片
	IsAuth       bool       `json:"is_auth"`                            //是否认证 0:未认证 1:已认证 2:认证失败
	AuthMsg      string     `json:"auth_msg"`                           //认证信息
	CreatedAt    *time.Time `json:"created_at" gorm:"-"`                //创建时间
	AuthTime     string     `json:"auth_time" gorm:"type:datetime"`     //认证时间
	CheckUser    string     `json:"check_user" gorm:"type:varchar(60)"` //审核人
}

func (PlatformAuth) TableName() string {
	return "platform_auth"
}

func (PlatformAuthSimple) TableName() string {
	return "platform_auth"
}