tango-core 0.3.0

The tango schema, entities, migrations, and search contract
Documentation
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

/// The deduplicated body of one transcript, for whole-transcript search.
///
/// One row per (video, language, source). The body is the cue texts merged by
/// `deduplicate_blocks`, which is what removes the rolling repetition that
/// makes raw ASR prose hard to rank and fills results with near-duplicates.
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "video_transcript_documents")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false)]
    pub video_id: String,
    #[sea_orm(primary_key, auto_increment = false)]
    pub lang: String,
    #[sea_orm(primary_key, auto_increment = false)]
    pub source: String,
    pub body: String,
    /// Generated and therefore never inserted; see `transcript::Model::tsv`.
    #[sea_orm(ignore)]
    pub tsv: String,
    pub updated_at: DateTimeWithTimeZone,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}