2023-03-02 05:32:45 +00:00
|
|
|
|
// Package model -----------------------------
|
|
|
|
|
// @file : artshow.go
|
|
|
|
|
// @author : JJXu
|
|
|
|
|
// @contact : wavingbear@163.com
|
|
|
|
|
// @time : 2023/3/2 9:32
|
|
|
|
|
// -------------------------------------------
|
|
|
|
|
package model
|
|
|
|
|
|
2023-03-03 07:28:55 +00:00
|
|
|
|
type ArtshowVideoRecord struct {
|
2023-03-02 05:32:45 +00:00
|
|
|
|
Model
|
|
|
|
|
//通过这两个字段弱关联 artwork_lock_record表中对应的画作
|
|
|
|
|
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
|
2023-03-03 01:12:26 +00:00
|
|
|
|
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
2023-03-02 05:32:45 +00:00
|
|
|
|
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"`
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-03 07:28:55 +00:00
|
|
|
|
func (a ArtshowVideoRecord) TableName() string {
|
2023-03-02 09:22:10 +00:00
|
|
|
|
return "artshow_video_record"
|
2023-03-02 05:32:45 +00:00
|
|
|
|
}
|
2023-03-03 07:28:55 +00:00
|
|
|
|
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
|
|
|
|
|
}
|