Skip to main content

relay_agent_entity/gen/
inbox.rs

1//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.19
2
3use sea_orm::entity::prelude::*;
4use serde::{Deserialize, Serialize};
5
6#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
7#[sea_orm(table_name = "inbox")]
8pub struct Model {
9    #[sea_orm(primary_key, auto_increment = false)]
10    pub id: Uuid,
11    pub inbox_id: Option<String>,
12    pub user_id: String,
13    pub created_at: DateTime,
14}
15
16#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
17pub enum Relation {
18    #[sea_orm(has_many = "super::message::Entity")]
19    Message,
20}
21
22impl Related<super::message::Entity> for Entity {
23    fn to() -> RelationDef {
24        Relation::Message.def()
25    }
26}
27
28impl ActiveModelBehavior for ActiveModel {}