Skip to content
Clone
030e59e
24 lines 754 B Rust
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "issue_user")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub uid: Uuid,
pub issue_id: Uuid,
#[sea_orm(default_value = "false")]
pub is_read: bool,
#[sea_orm(default_value = "false")]
pub is_mentioned: bool,
pub created_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "uid", to = "uid")]
pub user: BelongsTo<super::super::user::users::Entity>,
#[sea_orm(belongs_to, from = "issue_id", to = "id")]
pub issue: BelongsTo<super::issue::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}