//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.11 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "github_issue_syncs")] pub struct Model { pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub repo_issue_id: i64, pub github_issue_id: i64, pub issue_url: String, pub created_by_id: Option, pub issue_id: Uuid, pub project_id: Uuid, pub repository_sync_id: Uuid, pub updated_by_id: Option, pub workspace_id: Uuid, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::github_comment_syncs::Entity")] GithubCommentSyncs, #[sea_orm( belongs_to = "super::github_repository_syncs::Entity", from = "Column::RepositorySyncId", to = "super::github_repository_syncs::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] GithubRepositorySyncs, #[sea_orm( belongs_to = "super::issues::Entity", from = "Column::IssueId", to = "super::issues::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Issues2, #[sea_orm( belongs_to = "super::issues::Entity", from = "Column::IssueId", to = "super::issues::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Issues1, #[sea_orm( belongs_to = "super::projects::Entity", from = "Column::ProjectId", to = "super::projects::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Projects2, #[sea_orm( belongs_to = "super::projects::Entity", from = "Column::ProjectId", to = "super::projects::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Projects1, #[sea_orm( belongs_to = "super::users::Entity", from = "Column::CreatedById", to = "super::users::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Users2, #[sea_orm( belongs_to = "super::users::Entity", from = "Column::UpdatedById", to = "super::users::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Users1, #[sea_orm( belongs_to = "super::workspaces::Entity", from = "Column::WorkspaceId", to = "super::workspaces::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Workspaces2, #[sea_orm( belongs_to = "super::workspaces::Entity", from = "Column::WorkspaceId", to = "super::workspaces::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Workspaces1, } impl Related for Entity { fn to() -> RelationDef { Relation::GithubCommentSyncs.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::GithubRepositorySyncs.def() } } impl ActiveModelBehavior for ActiveModel {}