package model

import "time"

// TagCategory represents a hierarchical tag category
type TagCategory struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	ParentID    int64     `json:"parent_id,omitempty"`
	Description string    `json:"description,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
}

// Tag represents a content tag with category
type Tag struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	CategoryID  int64     `json:"category_id"`
	Aliases     string    `json:"aliases,omitempty"`
	Description string    `json:"description,omitempty"`
	Source      string    `json:"source,omitempty"`
	SourceID    string    `json:"source_id,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

// SceneTag represents a tag applied to a scene with ML support
type SceneTag struct {
	SceneID    int64     `json:"scene_id"`
	TagID      int64     `json:"tag_id"`
	Confidence float64   `json:"confidence"`
	Source     string    `json:"source"`
	Verified   bool      `json:"verified"`
	CreatedAt  time.Time `json:"created_at"`
}

// SceneImage represents an image associated with a scene
type SceneImage struct {
	ID        int64     `json:"id"`
	SceneID   int64     `json:"scene_id"`
	ImageURL  string    `json:"image_url"`
	ImagePath string    `json:"image_path,omitempty"`
	Source    string    `json:"source,omitempty"`
	SourceID  string    `json:"source_id,omitempty"`
	Width     int       `json:"width,omitempty"`
	Height    int       `json:"height,omitempty"`
	FileSize  int64     `json:"file_size,omitempty"`
	CreatedAt time.Time `json:"created_at"`
}

// MLPrediction represents an ML model's tag predictions
type MLPrediction struct {
	ID           int64     `json:"id"`
	SceneID      int64     `json:"scene_id,omitempty"`
	ImageID      int64     `json:"image_id,omitempty"`
	ModelVersion string    `json:"model_version"`
	Predictions  string    `json:"predictions"` // JSON array of {tag_id, confidence}
	CreatedAt    time.Time `json:"created_at"`
}
