fonchain-artistinfo/cmd/model/artshow_artistIndex.go
2023-03-03 15:28:55 +08:00

37 lines
1.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package model -----------------------------
// @file : artshow_artistIndex.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/2 23:11
// -------------------------------------------
package model
// 画家指数
type ArtshowArtistIndex struct {
Model
ArtistUid string `gorm:"column:artist_uid;comment:画家uid" json:"artistUid"`
Title string `gorm:"column:title;comment:" json:"title"` //艺术家-展览(exhibition) 、 艺术家-资历seniority 、艺术家-专业specialized 、艺术家-影响力Influence、艺术家-收藏collect
Class string `gorm:"column:class;comment:指数类别" json:"class"` //exhibition 、seniority 、specialized 、Influence 、collect
TitleScore int64 `gorm:"column:title_score;comment:总分" json:"titleScore"`
Score string `gorm:"column:score;comment:前端定义的分数列表" json:"score"` //
Types string `gorm:"column:types;comment:" json:"types"`
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;default:5;comment:审核状态2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
AuditMark1 string `json:"auditMark1" gorm:"column:audit_mark1;comment:审核备注1"`
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
}
func (a ArtshowArtistIndex) TableName() string {
return "artshow_artist_index"
}
func (a *ArtshowArtistIndex) Editable() bool {
if a.Status == 1 {
return true
}
if a.Status == 2 && (a.AuditStatus == AuditType_Failed || a.AuditStatus == AuditType_Pending || a.AuditStatus == AuditType_Supplemented) {
return true
}
return false
}