use sea_orm::entity::prelude::*; use sea_orm::JsonValue; use time::OffsetDateTime; use uuid::Uuid; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)] #[sea_orm(table_name = "project_activities")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub project_id: Uuid, pub actor_id: Uuid, pub verb: String, pub target_kind: String, pub target_id: Option, #[sea_orm(column_type = "Json")] pub payload: Option, pub created_at: OffsetDateTime, #[sea_orm(belongs_to, from = "project_id", to = "id")] pub project: BelongsTo, #[sea_orm(belongs_to, from = "actor_id", to = "uid")] pub actor: BelongsTo, } impl ActiveModelBehavior for ActiveModel {}