This commit is contained in:
2026-08-16 13:00:29 +02:00
parent e6d6968e52
commit 7fc8edd1d0
71 changed files with 2359 additions and 448 deletions
+27
View File
@@ -0,0 +1,27 @@
use sea_orm::Set;
use sea_orm::entity::prelude::*;
use sea_orm::prelude::async_trait::async_trait;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "emoji_alias")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub emoji_id: Uuid,
pub alias: String,
pub created_at: DateTimeUtc,
pub updated_at: DateTimeUtc,
#[sea_orm(belongs_to, from = "emoji_id", to = "id", on_delete = "Cascade")]
pub emoji: HasOne<super::emoji::Entity>,
}
#[async_trait]
impl ActiveModelBehavior for ActiveModel {
fn new() -> Self {
Self {
id: Set(Uuid::new_v4()),
..Default::default()
}
}
}