Refactor video handling and integrate new services
- Removed legacy video handling code and models to streamline the codebase. - Updated main.go to include new services for removing watermarks and smoke logging. - Enhanced route registration to accommodate new handlers for watermark removal and smoke logging. - Improved database migration to include new models for watermark processing.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type VideoParseLog struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
MiniProgramID uint `gorm:"index:idx_video_parse_user_date,priority:1" json:"mini_program_id"`
|
||||
UserID uint `gorm:"index:idx_video_parse_user_date,priority:2" json:"user_id"`
|
||||
RequestContent string `gorm:"type:text" json:"request_content"`
|
||||
ParsedURL string `gorm:"size:500" json:"parsed_url"`
|
||||
ThirdPartyStatus int `json:"third_party_status"`
|
||||
ThirdPartyPayload []byte `gorm:"type:json" json:"third_party_payload"`
|
||||
FreeQuotaUsed bool `gorm:"default:1" json:"free_quota_used"`
|
||||
DurationMs int `json:"duration_ms"`
|
||||
ErrorMessage string `gorm:"size:500" json:"error_message"`
|
||||
}
|
||||
|
||||
func (VideoParseLog) TableName() string {
|
||||
return "video_parse_logs"
|
||||
}
|
||||
|
||||
type VideoParseUnlock struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
MiniProgramID uint `gorm:"index:idx_video_unlock_user_date,priority:1" json:"mini_program_id"`
|
||||
UserID uint `gorm:"index:idx_video_unlock_user_date,priority:2" json:"user_id"`
|
||||
UnlockDate time.Time `gorm:"type:date;index:idx_video_unlock_user_date,priority:3" json:"unlock_date"`
|
||||
AdWatchedAt time.Time `json:"ad_watched_at"`
|
||||
}
|
||||
|
||||
func (VideoParseUnlock) TableName() string {
|
||||
return "video_parse_unlocks"
|
||||
}
|
||||
Reference in New Issue
Block a user