-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1641 from scpwiki/WJ-1193-interactions
[WJ-1193] Implement interactions
- Loading branch information
Showing
34 changed files
with
1,203 additions
and
356 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.3 | ||
use super::sea_orm_active_enums::InteractionObjectType; | ||
use sea_orm::entity::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] | ||
#[sea_orm(table_name = "interaction")] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Model { | ||
#[sea_orm(primary_key)] | ||
pub interaction_id: i64, | ||
#[sea_orm(column_type = "Text")] | ||
pub interaction_type: String, | ||
pub dest_type: InteractionObjectType, | ||
pub dest_id: i64, | ||
pub from_type: InteractionObjectType, | ||
pub from_id: i64, | ||
pub metadata: Json, | ||
pub created_by: i64, | ||
pub created_at: TimeDateTimeWithTimeZone, | ||
pub overwritten_by: Option<i64>, | ||
pub overwritten_at: Option<TimeDateTimeWithTimeZone>, | ||
pub deleted_by: Option<i64>, | ||
pub deleted_at: Option<TimeDateTimeWithTimeZone>, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] | ||
pub enum Relation { | ||
#[sea_orm( | ||
belongs_to = "super::user::Entity", | ||
from = "Column::CreatedBy", | ||
to = "super::user::Column::UserId", | ||
on_update = "NoAction", | ||
on_delete = "NoAction" | ||
)] | ||
User3, | ||
#[sea_orm( | ||
belongs_to = "super::user::Entity", | ||
from = "Column::DeletedBy", | ||
to = "super::user::Column::UserId", | ||
on_update = "NoAction", | ||
on_delete = "NoAction" | ||
)] | ||
User2, | ||
#[sea_orm( | ||
belongs_to = "super::user::Entity", | ||
from = "Column::OverwrittenBy", | ||
to = "super::user::Column::UserId", | ||
on_update = "NoAction", | ||
on_delete = "NoAction" | ||
)] | ||
User1, | ||
} | ||
|
||
impl ActiveModelBehavior for ActiveModel {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.