main
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "chat_reaction")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub message_id: Uuid,
#[sea_orm(primary_key, auto_increment = false)]
pub emoji: String,
#[sea_orm(primary_key, auto_increment = false)]
pub user_id: i64,
pub created_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "message_id", to = "id")]
pub message: BelongsTo<super::messages::Entity>,
#[sea_orm(belongs_to, from = "user_id", to = "uid")]
pub user: BelongsTo<super::super::users::user::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}