package domain

import "time"

// MediaObjectID is a typed media object identifier with prefix "med_".
type MediaObjectID string

// MediaObject tracks a stored media file with ownership and metadata.
// The actual file is stored in GCS (production) or MemoryStore (dev).
// This record enables querying, soft deletes, and provenance tracking.
type MediaObject struct {
	ID              MediaObjectID
	UserID          UserID
	Path            string // Storage path (e.g., "media/usr_123/uuid/photo.png")
	Filename        string // Original filename
	ContentType     string
	Size            int64
	GenerationJobID string // Non-empty if created by AI generation
	DeletedAt       *time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

// IsDeleted returns true if the media object has been soft-deleted.
func (m *MediaObject) IsDeleted() bool {
	return m.DeletedAt != nil
}
