Files
stream.api/internal/database/model/video.gen.go
claude e7fdd0e1ab feat: Add player_configs feature and migrate user preferences
- Implemented player_configs table to store multiple player configurations per user.
- Migrated existing player settings from user_preferences to player_configs.
- Removed player-related columns from user_preferences.
- Added referral state fields to user for tracking referral rewards.
- Created migration scripts for database changes and data migration.
- Added test cases for app services and usage helpers.
- Introduced video job service interfaces and implementations.
2026-03-24 16:08:36 +00:00

44 lines
2.5 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
"gorm.io/datatypes"
)
const TableNameVideo = "video"
// Video mapped from table <video>
type Video struct {
ID string `gorm:"column:id;type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
Name string `gorm:"column:name;type:text;not null" json:"name"`
Title string `gorm:"column:title;type:text;not null" json:"title"`
Description *string `gorm:"column:description;type:text" json:"description"`
URL string `gorm:"column:url;type:text;not null" json:"url"`
Thumbnail *string `gorm:"column:thumbnail;type:text" json:"thumbnail"`
HlsToken *string `gorm:"column:hls_token;type:text" json:"hls_token"`
HlsPath *string `gorm:"column:hls_path;type:text" json:"hls_path"`
Duration int32 `gorm:"column:duration;type:integer;not null" json:"duration"`
Size int64 `gorm:"column:size;type:bigint;not null" json:"size"`
StorageType *string `gorm:"column:storage_type;type:character varying(20);not null;default:tiktok_avatar" json:"storage_type"`
Format string `gorm:"column:format;type:text;not null" json:"format"`
Status *string `gorm:"column:status;type:character varying(20);not null;default:PUBLIC" json:"status"`
ProcessingStatus *string `gorm:"column:processing_status;type:character varying(20);not null;default:PENDING" json:"processing_status"`
Views int32 `gorm:"column:views;type:integer;not null" json:"views"`
UserID string `gorm:"column:user_id;type:uuid;not null" json:"user_id"`
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp(3) without time zone;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp(3) without time zone;not null" json:"updated_at"`
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
AdID *string `gorm:"column:ad_id;type:uuid" json:"ad_id"`
Metadata *datatypes.JSON `gorm:"column:metadata;type:jsonb" json:"metadata"`
}
// TableName Video's table name
func (*Video) TableName() string {
return TableNameVideo
}