//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "similar_uploads")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub upload_id1: Uuid,
pub upload_id2: Uuid,
#[sea_orm(column_type = "Float")]
pub similarity_score: f32,
pub detection_method: Option<String>,
pub created_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(
belongs_to = "super::uploads::Entity",
from = "Column::UploadId1",
to = "super::uploads::Column::Id",
on_update = "Cascade",
on_delete = "Cascade"
)]
Uploads2,
#[sea_orm(
belongs_to = "super::uploads::Entity",
from = "Column::UploadId2",
to = "super::uploads::Column::Id",
on_update = "Cascade",
on_delete = "Cascade"
)]
Uploads1,
}
impl ActiveModelBehavior for ActiveModel {}
⭐
Log in to mark this repository.
1.0 KiB · text
History
c20d4f7