package particle

import "time"

type FirestoreMediaParticle struct {
	CreatedByHumanId string                           `firestore:"created_by_human_id"`
	Type             string                           `firestore:"type"`
	Properties       FirestoreMediaParticleProperties `firestore:"properties"`
	CreatedAt        time.Time                        `firestore:"created_at,serverTimestamp"`
	UpdatedAt        *time.Time                       `firestore:"updated_at,omitempty"`
}

type FirestoreTranscriptWord struct {
	Word  string  `firestore:"word"`
	Start float64 `firestore:"start"`
	End   float64 `firestore:"end"`
}

type FirestoreTranscriptSentence struct {
	Text  string  `firestore:"text"`
	Start float64 `firestore:"start"`
	End   float64 `firestore:"end"`
}

type FirestoreTranscriptParagraph struct {
	Sentences []FirestoreTranscriptSentence `firestore:"sentences"`
	Start     float64                       `firestore:"start"`
	End       float64                       `firestore:"end"`
}

type FirestoreTranscript struct {
	Transcript string                         `firestore:"transcript"`
	Words      []FirestoreTranscriptWord      `firestore:"words"`
	Paragraphs []FirestoreTranscriptParagraph `firestore:"paragraphs"`
}

type FirestoreMediaParticleProperties struct {
	ObjectId           string               `firestore:"object_id"`
	MimeType           string               `firestore:"mime_type"`
	DurationMs         int                  `firestore:"duration_ms"`
	SizeBytes          int                  `firestore:"size_bytes"`
	Transcript         *FirestoreTranscript `firestore:"transcript,omitempty"`
	TranscodedObjectId string               `firestore:"transcoded_object_id,omitempty"`
	TranscodedMimeType string               `firestore:"transcoded_mime_type,omitempty"`
}

type FirestoreStreamParticle struct {
	CreatedByHumanId         string               `firestore:"created_by_human_id"`
	Type                     string               `firestore:"type"`
	Status                   string               `firestore:"status"`
	CreatedAt                time.Time            `firestore:"created_at,serverTimestamp"`
	LastChildCreatedAt       *time.Time           `firestore:"last_child_created_at,omitempty"`
	VisibleTo                []string             `firestore:"visible_to"`
	PlaybackMarkers          map[string]time.Time `firestore:"playback_markers,omitempty"`
	UpdatedAt                *time.Time           `firestore:"updated_at,omitempty"`
	HuddleActiveParticipants []string             `firestore:"huddle_active_participants,omitempty"`
}
