// Package model ----------------------------- // @file : artshow.go // @author : JJXu // @contact : wavingbear@163.com // @time : 2023/3/2 9:32 // ------------------------------------------- package model type ArtshowVideoRecord struct { Model //通过这两个字段弱关联 artwork_lock_record表中对应的画作 ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"` Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示 LockTime string `json:"lockTime" gorm:"column:lock_time;comment:"` //AccountId int64 `json:"accountId" gorm:"column:account_id;comment:"` ArtistName string `json:"artistName" gorm:"column:artist_name;comment:"` VideoUrl string `json:"videoUrl" gorm:"column:video_url;comment:"` //审批字段 AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;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 ArtshowVideoRecord) TableName() string { return "artshow_video_record" } func (a *ArtshowVideoRecord) 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 }