Add api tokens

This commit is contained in:
eraden 2024-02-10 11:03:40 +01:00
parent ae327c1c91
commit c0b9ed0353
93 changed files with 3897 additions and 4103 deletions

View File

@ -24,6 +24,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -31,13 +47,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,6 +30,23 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[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,
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -10,6 +10,7 @@ pub struct Model {
pub updated_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone,
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
#[sea_orm(unique)]
pub token: String, pub token: String,
pub label: String, pub label: String,
pub user_type: i16, pub user_type: i16,
@ -26,6 +27,40 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::importers::Entity")]
Importers,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users6,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users5,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users4,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm( #[sea_orm(
belongs_to = "super::users::Entity", belongs_to = "super::users::Entity",
from = "Column::UserId", from = "Column::UserId",
@ -33,12 +68,44 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Users, Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm(has_many = "super::workspace_integrations::Entity")]
WorkspaceIntegrations,
#[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<super::users::Entity> for Entity { impl Related<super::importers::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Users.def() Relation::Importers.def()
}
}
impl Related<super::workspace_integrations::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceIntegrations.def()
} }
} }

View File

@ -8,10 +8,28 @@ use serde::{Deserialize, Serialize};
pub struct Model { pub struct Model {
#[sea_orm(primary_key)] #[sea_orm(primary_key)]
pub id: i32, pub id: i32,
#[sea_orm(unique)]
pub name: String, pub name: String,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::auth_group_permissions::Entity")]
AuthGroupPermissions,
#[sea_orm(has_many = "super::users_groups::Entity")]
UsersGroups,
}
impl Related<super::auth_group_permissions::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthGroupPermissions.def()
}
}
impl Related<super::users_groups::Entity> for Entity {
fn to() -> RelationDef {
Relation::UsersGroups.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,6 +13,35 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::auth_group::Entity",
from = "Column::GroupId",
to = "super::auth_group::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
AuthGroup,
#[sea_orm(
belongs_to = "super::auth_permission::Entity",
from = "Column::PermissionId",
to = "super::auth_permission::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
AuthPermission,
}
impl Related<super::auth_group::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthGroup.def()
}
}
impl Related<super::auth_permission::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthPermission.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -14,6 +14,37 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::auth_group_permissions::Entity")]
AuthGroupPermissions,
#[sea_orm(
belongs_to = "super::django_content_type::Entity",
from = "Column::ContentTypeId",
to = "super::django_content_type::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
DjangoContentType,
#[sea_orm(has_many = "super::users_user_permissions::Entity")]
UsersUserPermissions,
}
impl Related<super::auth_group_permissions::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthGroupPermissions.def()
}
}
impl Related<super::django_content_type::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoContentType.def()
}
}
impl Related<super::users_user_permissions::Entity> for Entity {
fn to() -> RelationDef {
Relation::UsersUserPermissions.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -9,6 +9,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub key: String, pub key: String,
pub created: DateTimeWithTimeZone, pub created: DateTimeWithTimeZone,
#[sea_orm(unique)]
pub user_id: Uuid, pub user_id: Uuid,
} }
@ -21,13 +22,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Users, Users2,
} #[sea_orm(
belongs_to = "super::users::Entity",
impl Related<super::users::Entity> for Entity { from = "Column::UserId",
fn to() -> RelationDef { to = "super::users::Column::Id",
Relation::Users.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Users1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -28,7 +28,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
IssueComments, IssueComments2,
#[sea_orm(
belongs_to = "super::issue_comments::Entity",
from = "Column::CommentId",
to = "super::issue_comments::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
IssueComments1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -36,7 +44,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -44,25 +84,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issue_comments::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::IssueComments.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Cycles, Cycles2,
#[sea_orm(
belongs_to = "super::cycles::Entity",
from = "Column::CycleId",
to = "super::cycles::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Cycles1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users4,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm( #[sea_orm(
belongs_to = "super::users::Entity", belongs_to = "super::users::Entity",
from = "Column::UserId", from = "Column::UserId",
@ -43,7 +75,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Users, Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -51,31 +91,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::cycles::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Cycles.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::users::Entity> for Entity {
fn to() -> RelationDef {
Relation::Users.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -12,6 +12,7 @@ pub struct Model {
pub id: Uuid, pub id: Uuid,
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
pub cycle_id: Uuid, pub cycle_id: Uuid,
#[sea_orm(unique)]
pub issue_id: Uuid, pub issue_id: Uuid,
pub project_id: Uuid, pub project_id: Uuid,
pub updated_by_id: Option<Uuid>, pub updated_by_id: Option<Uuid>,
@ -27,7 +28,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Cycles, Cycles2,
#[sea_orm(
belongs_to = "super::cycles::Entity",
from = "Column::CycleId",
to = "super::cycles::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Cycles1,
#[sea_orm( #[sea_orm(
belongs_to = "super::issues::Entity", belongs_to = "super::issues::Entity",
from = "Column::IssueId", from = "Column::IssueId",
@ -35,7 +44,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -43,7 +60,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -51,31 +92,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::cycles::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Cycles.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::Issues.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,10 +30,6 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::cycle_favorites::Entity")]
CycleFavorites,
#[sea_orm(has_many = "super::cycle_issues::Entity")]
CycleIssues,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -41,7 +37,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::OwnedById",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -49,31 +77,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::cycle_favorites::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::CycleFavorites.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::cycle_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::CycleIssues.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -12,6 +12,15 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::django_celery_beat_periodictask::Entity")]
DjangoCeleryBeatPeriodictask,
}
impl Related<super::django_celery_beat_periodictask::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatPeriodictask.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -17,6 +17,15 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::django_celery_beat_periodictask::Entity")]
DjangoCeleryBeatPeriodictask,
}
impl Related<super::django_celery_beat_periodictask::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatPeriodictask.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,6 +13,15 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::django_celery_beat_periodictask::Entity")]
DjangoCeleryBeatPeriodictask,
}
impl Related<super::django_celery_beat_periodictask::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatPeriodictask.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -37,6 +37,63 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::django_celery_beat_clockedschedule::Entity",
from = "Column::ClockedId",
to = "super::django_celery_beat_clockedschedule::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
DjangoCeleryBeatClockedschedule,
#[sea_orm(
belongs_to = "super::django_celery_beat_crontabschedule::Entity",
from = "Column::CrontabId",
to = "super::django_celery_beat_crontabschedule::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
DjangoCeleryBeatCrontabschedule,
#[sea_orm(
belongs_to = "super::django_celery_beat_intervalschedule::Entity",
from = "Column::IntervalId",
to = "super::django_celery_beat_intervalschedule::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
DjangoCeleryBeatIntervalschedule,
#[sea_orm(
belongs_to = "super::django_celery_beat_solarschedule::Entity",
from = "Column::SolarId",
to = "super::django_celery_beat_solarschedule::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
DjangoCeleryBeatSolarschedule,
}
impl Related<super::django_celery_beat_clockedschedule::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatClockedschedule.def()
}
}
impl Related<super::django_celery_beat_crontabschedule::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatCrontabschedule.def()
}
}
impl Related<super::django_celery_beat_intervalschedule::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatIntervalschedule.def()
}
}
impl Related<super::django_celery_beat_solarschedule::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatSolarschedule.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -16,6 +16,15 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::django_celery_beat_periodictask::Entity")]
DjangoCeleryBeatPeriodictask,
}
impl Related<super::django_celery_beat_periodictask::Entity> for Entity {
fn to() -> RelationDef {
Relation::DjangoCeleryBeatPeriodictask.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,6 +13,15 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::auth_permission::Entity")]
AuthPermission,
}
impl Related<super::auth_permission::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthPermission.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -1,19 +0,0 @@
//! `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 = "django_migrations")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
pub app: String,
pub name: String,
pub applied: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,7 +30,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Estimates, Estimates2,
#[sea_orm(
belongs_to = "super::estimates::Entity",
from = "Column::EstimateId",
to = "super::estimates::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Estimates1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -38,7 +46,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -46,25 +78,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::estimates::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Estimates.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -21,8 +21,6 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::estimate_points::Entity")]
EstimatePoints,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -30,7 +28,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -38,25 +60,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::estimate_points::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::EstimatePoints.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -18,6 +18,7 @@ pub struct Model {
#[sea_orm(column_type = "Text")] #[sea_orm(column_type = "Text")]
pub key: String, pub key: String,
pub url: Option<String>, pub url: Option<String>,
#[sea_orm(unique)]
pub token: String, pub token: String,
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
pub initiated_by_id: Uuid, pub initiated_by_id: Uuid,
@ -27,6 +28,30 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::InitiatedById",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -34,13 +59,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -20,6 +20,37 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[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"
)]
Workspaces,
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -21,6 +21,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::github_issue_syncs::Entity",
from = "Column::IssueSyncId",
to = "super::github_issue_syncs::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
GithubIssueSyncs,
#[sea_orm(
belongs_to = "super::issue_comments::Entity",
from = "Column::CommentId",
to = "super::issue_comments::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
IssueComments,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -28,7 +44,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -36,18 +76,26 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::github_issue_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::GithubIssueSyncs.def()
} }
} }
impl Related<super::workspaces::Entity> for Entity { impl Related<super::issue_comments::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::IssueComments.def()
} }
} }

View File

@ -23,6 +23,16 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { 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( #[sea_orm(
belongs_to = "super::issues::Entity", belongs_to = "super::issues::Entity",
from = "Column::IssueId", from = "Column::IssueId",
@ -30,7 +40,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -38,7 +56,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -46,24 +88,26 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::issues::Entity> for Entity { impl Related<super::github_comment_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Issues.def() Relation::GithubCommentSyncs.def()
} }
} }
impl Related<super::projects::Entity> for Entity { impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::GithubRepositorySyncs.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -24,6 +24,8 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_one = "super::github_repository_syncs::Entity")]
GithubRepositorySyncs,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -31,7 +33,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -39,18 +65,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::GithubRepositorySyncs.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -16,6 +16,7 @@ pub struct Model {
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
pub label_id: Option<Uuid>, pub label_id: Option<Uuid>,
pub project_id: Uuid, pub project_id: Uuid,
#[sea_orm(unique)]
pub repository_id: Uuid, pub repository_id: Uuid,
pub updated_by_id: Option<Uuid>, pub updated_by_id: Option<Uuid>,
pub workspace_id: Uuid, pub workspace_id: Uuid,
@ -24,6 +25,24 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::github_issue_syncs::Entity")]
GithubIssueSyncs,
#[sea_orm(
belongs_to = "super::github_repositories::Entity",
from = "Column::RepositoryId",
to = "super::github_repositories::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
GithubRepositories,
#[sea_orm(
belongs_to = "super::labels::Entity",
from = "Column::LabelId",
to = "super::labels::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Labels,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -31,7 +50,47 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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::workspace_integrations::Entity",
from = "Column::WorkspaceIntegrationId",
to = "super::workspace_integrations::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
WorkspaceIntegrations,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -39,18 +98,38 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::github_issue_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::GithubIssueSyncs.def()
} }
} }
impl Related<super::workspaces::Entity> for Entity { impl Related<super::github_repositories::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::GithubRepositories.def()
}
}
impl Related<super::labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::Labels.def()
}
}
impl Related<super::workspace_integrations::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceIntegrations.def()
} }
} }

View File

@ -27,6 +27,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -34,13 +50,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,6 +30,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::api_tokens::Entity",
from = "Column::TokenId",
to = "super::api_tokens::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
ApiTokens,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -37,7 +45,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::InitiatedById",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -45,18 +85,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::api_tokens::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::ApiTokens.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -27,6 +27,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::inboxes::Entity",
from = "Column::InboxId",
to = "super::inboxes::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Inboxes,
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::DuplicateToId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues3,
#[sea_orm( #[sea_orm(
belongs_to = "super::issues::Entity", belongs_to = "super::issues::Entity",
from = "Column::IssueId", from = "Column::IssueId",
@ -34,7 +50,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -42,7 +66,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -50,24 +98,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::issues::Entity> for Entity { impl Related<super::inboxes::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Issues.def() Relation::Inboxes.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -24,6 +24,10 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::inbox_issues::Entity")]
InboxIssues,
#[sea_orm(has_many = "super::project_deploy_boards::Entity")]
ProjectDeployBoards,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -31,7 +35,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -39,18 +67,26 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::inbox_issues::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::InboxIssues.def()
} }
} }
impl Related<super::workspaces::Entity> for Entity { impl Related<super::project_deploy_boards::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::ProjectDeployBoards.def()
} }
} }

View File

@ -21,6 +21,45 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::instances::Entity",
from = "Column::InstanceId",
to = "super::instances::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Instances,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
}
impl Related<super::instances::Entity> for Entity {
fn to() -> RelationDef {
Relation::Instances.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -10,6 +10,7 @@ pub struct Model {
pub updated_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone,
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
#[sea_orm(unique)]
pub key: String, pub key: String,
#[sea_orm(column_type = "Text", nullable)] #[sea_orm(column_type = "Text", nullable)]
pub value: Option<String>, pub value: Option<String>,
@ -21,6 +22,23 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[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,
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,6 +13,7 @@ pub struct Model {
pub instance_name: String, pub instance_name: String,
#[sea_orm(column_type = "Text", nullable)] #[sea_orm(column_type = "Text", nullable)]
pub whitelist_emails: Option<String>, pub whitelist_emails: Option<String>,
#[sea_orm(unique)]
pub instance_id: String, pub instance_id: String,
pub license_key: Option<String>, pub license_key: Option<String>,
pub api_key: String, pub api_key: String,
@ -30,6 +31,31 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_many = "super::instance_admins::Entity")]
InstanceAdmins,
#[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,
}
impl Related<super::instance_admins::Entity> for Entity {
fn to() -> RelationDef {
Relation::InstanceAdmins.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -11,6 +11,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
pub title: String, pub title: String,
#[sea_orm(unique)]
pub provider: String, pub provider: String,
pub network: i32, pub network: i32,
#[sea_orm(column_type = "JsonBinary")] #[sea_orm(column_type = "JsonBinary")]
@ -31,6 +32,31 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[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(has_many = "super::workspace_integrations::Entity")]
WorkspaceIntegrations,
}
impl Related<super::workspace_integrations::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceIntegrations.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -34,6 +34,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::issue_comments::Entity",
from = "Column::IssueCommentId",
to = "super::issue_comments::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
IssueComments,
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::IssueId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -41,7 +57,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -49,18 +97,26 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::issue_comments::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::IssueComments.def()
} }
} }
impl Related<super::workspaces::Entity> for Entity { impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::Issues.def()
} }
} }

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::AssigneeId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -29,7 +29,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -37,7 +45,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -45,25 +77,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -20,6 +20,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::BlockId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues2,
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::BlockedById",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -27,7 +43,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -35,19 +75,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,8 +30,10 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::comment_reactions::Entity")] #[sea_orm(has_many = "super::github_comment_syncs::Entity")]
CommentReactions, GithubCommentSyncs,
#[sea_orm(has_many = "super::issue_activities::Entity")]
IssueActivities,
#[sea_orm( #[sea_orm(
belongs_to = "super::issues::Entity", belongs_to = "super::issues::Entity",
from = "Column::IssueId", from = "Column::IssueId",
@ -39,7 +41,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -47,7 +57,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -55,30 +97,26 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::comment_reactions::Entity> for Entity { impl Related<super::github_comment_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::CommentReactions.def() Relation::GithubCommentSyncs.def()
} }
} }
impl Related<super::issues::Entity> for Entity { impl Related<super::issue_activities::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Issues.def() Relation::IssueActivities.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -27,7 +27,23 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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::labels::Entity",
from = "Column::LabelId",
to = "super::labels::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Labels,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +51,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,24 +83,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::issues::Entity> for Entity { impl Related<super::labels::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Issues.def() Relation::Labels.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -30,7 +30,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -38,7 +46,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -46,25 +78,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MentionId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -28,7 +28,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -36,19 +68,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -28,7 +28,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -36,7 +44,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -44,25 +84,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -28,6 +28,22 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues4,
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::IssueId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues3,
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::RelatedIssueId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues2, Issues2,
#[sea_orm( #[sea_orm(
belongs_to = "super::issues::Entity", belongs_to = "super::issues::Entity",
@ -44,7 +60,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -52,19 +92,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -21,6 +21,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::IssueId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -28,7 +36,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -36,18 +68,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::Issues.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::SubscriberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -33,7 +33,33 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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(has_many = "super::view_favorites::Entity")]
ViewFavorites,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -41,18 +67,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::view_favorites::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::ViewFavorites.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -28,7 +28,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -36,7 +44,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -44,25 +84,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -39,32 +39,20 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::cycle_issues::Entity")] #[sea_orm(has_many = "super::issue_activities::Entity")]
CycleIssues, IssueActivities,
#[sea_orm(has_many = "super::github_issue_syncs::Entity")] #[sea_orm(has_many = "super::issue_sequences::Entity")]
GithubIssueSyncs, IssueSequences,
#[sea_orm(has_many = "super::inbox_issues::Entity")] #[sea_orm(
InboxIssues, belongs_to = "Entity",
#[sea_orm(has_many = "super::issue_assignees::Entity")] from = "Column::ParentId",
IssueAssignees, to = "Column::Id",
#[sea_orm(has_many = "super::issue_attachments::Entity")] on_update = "NoAction",
IssueAttachments, on_delete = "NoAction"
#[sea_orm(has_many = "super::issue_comments::Entity")] )]
IssueComments, SelfRef,
#[sea_orm(has_many = "super::issue_labels::Entity")] #[sea_orm(has_many = "super::page_blocks::Entity")]
IssueLabels, PageBlocks,
#[sea_orm(has_many = "super::issue_links::Entity")]
IssueLinks,
#[sea_orm(has_many = "super::issue_mentions::Entity")]
IssueMentions,
#[sea_orm(has_many = "super::issue_reactions::Entity")]
IssueReactions,
#[sea_orm(has_many = "super::issue_subscribers::Entity")]
IssueSubscribers,
#[sea_orm(has_many = "super::issue_votes::Entity")]
IssueVotes,
#[sea_orm(has_many = "super::module_issues::Entity")]
ModuleIssues,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -72,7 +60,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::states::Entity",
from = "Column::StateId",
to = "super::states::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
States,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -80,96 +100,38 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::cycle_issues::Entity> for Entity { impl Related<super::issue_activities::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::CycleIssues.def() Relation::IssueActivities.def()
} }
} }
impl Related<super::github_issue_syncs::Entity> for Entity { impl Related<super::issue_sequences::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::GithubIssueSyncs.def() Relation::IssueSequences.def()
} }
} }
impl Related<super::inbox_issues::Entity> for Entity { impl Related<super::page_blocks::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::InboxIssues.def() Relation::PageBlocks.def()
} }
} }
impl Related<super::issue_assignees::Entity> for Entity { impl Related<super::states::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::IssueAssignees.def() Relation::States.def()
}
}
impl Related<super::issue_attachments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueAttachments.def()
}
}
impl Related<super::issue_comments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueComments.def()
}
}
impl Related<super::issue_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLabels.def()
}
}
impl Related<super::issue_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLinks.def()
}
}
impl Related<super::issue_mentions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueMentions.def()
}
}
impl Related<super::issue_reactions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueReactions.def()
}
}
impl Related<super::issue_subscribers::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueSubscribers.def()
}
}
impl Related<super::issue_votes::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueVotes.def()
}
}
impl Related<super::module_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleIssues.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -27,6 +27,20 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::github_repository_syncs::Entity")]
GithubRepositorySyncs,
#[sea_orm(has_many = "super::issue_labels::Entity")]
IssueLabels,
#[sea_orm(
belongs_to = "Entity",
from = "Column::ParentId",
to = "Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
SelfRef,
#[sea_orm(has_many = "super::page_labels::Entity")]
PageLabels,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -34,7 +48,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -42,18 +80,32 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::GithubRepositorySyncs.def()
} }
} }
impl Related<super::workspaces::Entity> for Entity { impl Related<super::issue_labels::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::IssueLabels.def()
}
}
impl Related<super::page_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLabels.def()
} }
} }

View File

@ -20,7 +20,6 @@ pub mod django_celery_beat_periodictask;
pub mod django_celery_beat_periodictasks; pub mod django_celery_beat_periodictasks;
pub mod django_celery_beat_solarschedule; pub mod django_celery_beat_solarschedule;
pub mod django_content_type; pub mod django_content_type;
pub mod django_migrations;
pub mod django_session; pub mod django_session;
pub mod estimate_points; pub mod estimate_points;
pub mod estimates; pub mod estimates;

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Modules, Modules2,
#[sea_orm(
belongs_to = "super::modules::Entity",
from = "Column::ModuleId",
to = "super::modules::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Modules1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::modules::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Modules.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -11,6 +11,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
#[sea_orm(unique)]
pub issue_id: Uuid, pub issue_id: Uuid,
pub module_id: Uuid, pub module_id: Uuid,
pub project_id: Uuid, pub project_id: Uuid,
@ -27,7 +28,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Issues, 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( #[sea_orm(
belongs_to = "super::modules::Entity", belongs_to = "super::modules::Entity",
from = "Column::ModuleId", from = "Column::ModuleId",
@ -35,7 +44,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Modules, Modules2,
#[sea_orm(
belongs_to = "super::modules::Entity",
from = "Column::ModuleId",
to = "super::modules::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Modules1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -43,7 +60,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -51,31 +92,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::issues::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Issues.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::modules::Entity> for Entity {
fn to() -> RelationDef {
Relation::Modules.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,7 +30,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Modules, Modules2,
#[sea_orm(
belongs_to = "super::modules::Entity",
from = "Column::ModuleId",
to = "super::modules::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Modules1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -38,7 +46,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -46,25 +78,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::modules::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Modules.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Modules, Modules2,
#[sea_orm(
belongs_to = "super::modules::Entity",
from = "Column::ModuleId",
to = "super::modules::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Modules1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MemberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::modules::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Modules.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -35,14 +35,6 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::module_favorites::Entity")]
ModuleFavorites,
#[sea_orm(has_many = "super::module_issues::Entity")]
ModuleIssues,
#[sea_orm(has_many = "super::module_links::Entity")]
ModuleLinks,
#[sea_orm(has_many = "super::module_members::Entity")]
ModuleMembers,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -50,7 +42,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::LeadId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -58,43 +82,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::module_favorites::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::ModuleFavorites.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::module_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleIssues.def()
}
}
impl Related<super::module_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleLinks.def()
}
}
impl Related<super::module_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleMembers.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -36,6 +36,46 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::projects::Entity",
from = "Column::ProjectId",
to = "super::projects::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Projects,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users4,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::ReceiverId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::TriggeredById",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,12 +83,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::Projects.def()
} }
} }

View File

@ -31,6 +31,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::issues::Entity",
from = "Column::IssueId",
to = "super::issues::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Issues,
#[sea_orm( #[sea_orm(
belongs_to = "super::pages::Entity", belongs_to = "super::pages::Entity",
from = "Column::PageId", from = "Column::PageId",
@ -38,7 +46,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Pages, Pages2,
#[sea_orm(
belongs_to = "super::pages::Entity",
from = "Column::PageId",
to = "super::pages::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Pages1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -46,7 +62,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -54,24 +94,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::pages::Entity> for Entity { impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Pages.def() Relation::Issues.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -27,7 +27,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Pages, Pages2,
#[sea_orm(
belongs_to = "super::pages::Entity",
from = "Column::PageId",
to = "super::pages::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Pages1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +43,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,25 +83,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::pages::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Pages.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -20,6 +20,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::labels::Entity",
from = "Column::LabelId",
to = "super::labels::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Labels,
#[sea_orm( #[sea_orm(
belongs_to = "super::pages::Entity", belongs_to = "super::pages::Entity",
from = "Column::PageId", from = "Column::PageId",
@ -27,7 +35,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Pages, Pages2,
#[sea_orm(
belongs_to = "super::pages::Entity",
from = "Column::PageId",
to = "super::pages::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Pages1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -35,7 +51,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,24 +83,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::pages::Entity> for Entity { impl Related<super::labels::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Pages.def() Relation::Labels.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -29,7 +29,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Pages, Pages2,
#[sea_orm(
belongs_to = "super::pages::Entity",
from = "Column::PageId",
to = "super::pages::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Pages1,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -37,7 +45,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -45,25 +77,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::pages::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Pages.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -31,14 +31,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::page_blocks::Entity")] #[sea_orm(
PageBlocks, belongs_to = "Entity",
#[sea_orm(has_many = "super::page_favorites::Entity")] from = "Column::ParentId",
PageFavorites, to = "Column::Id",
#[sea_orm(has_many = "super::page_labels::Entity")] on_update = "NoAction",
PageLabels, on_delete = "NoAction"
#[sea_orm(has_many = "super::page_logs::Entity")] )]
PageLogs, SelfRef,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -46,7 +46,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::OwnedById",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -54,43 +86,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::page_blocks::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::PageBlocks.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::page_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageFavorites.def()
}
}
impl Related<super::page_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLabels.def()
}
}
impl Related<super::page_logs::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLogs.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -18,7 +18,6 @@ pub use super::django_celery_beat_periodictask::Entity as DjangoCeleryBeatPeriod
pub use super::django_celery_beat_periodictasks::Entity as DjangoCeleryBeatPeriodictasks; pub use super::django_celery_beat_periodictasks::Entity as DjangoCeleryBeatPeriodictasks;
pub use super::django_celery_beat_solarschedule::Entity as DjangoCeleryBeatSolarschedule; pub use super::django_celery_beat_solarschedule::Entity as DjangoCeleryBeatSolarschedule;
pub use super::django_content_type::Entity as DjangoContentType; pub use super::django_content_type::Entity as DjangoContentType;
pub use super::django_migrations::Entity as DjangoMigrations;
pub use super::django_session::Entity as DjangoSession; pub use super::django_session::Entity as DjangoSession;
pub use super::estimate_points::Entity as EstimatePoints; pub use super::estimate_points::Entity as EstimatePoints;
pub use super::estimates::Entity as Estimates; pub use super::estimates::Entity as Estimates;

View File

@ -10,6 +10,7 @@ pub struct Model {
pub updated_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone,
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
#[sea_orm(unique)]
pub anchor: String, pub anchor: String,
pub comments: bool, pub comments: bool,
pub reactions: bool, pub reactions: bool,
@ -25,6 +26,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::inboxes::Entity",
from = "Column::InboxId",
to = "super::inboxes::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Inboxes,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -32,7 +41,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -40,18 +73,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::inboxes::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::Inboxes.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -26,7 +26,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -34,19 +66,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -12,6 +12,7 @@ pub struct Model {
pub updated_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone,
pub name: String, pub name: String,
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
#[sea_orm(unique)]
pub project_id: Uuid, pub project_id: Uuid,
pub updated_by_id: Option<Uuid>, pub updated_by_id: Option<Uuid>,
pub workspace_id: Option<Uuid>, pub workspace_id: Option<Uuid>,
@ -26,12 +27,44 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Workspaces,
} }
impl Related<super::projects::Entity> for Entity { impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::Workspaces.def()
} }
} }

View File

@ -34,7 +34,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -42,19 +66,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -40,7 +40,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MemberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -48,19 +80,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -26,7 +26,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MemberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -34,19 +66,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::projects::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Projects.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -41,104 +41,56 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::comment_reactions::Entity")] #[sea_orm(
CommentReactions, belongs_to = "super::estimates::Entity",
#[sea_orm(has_many = "super::cycle_favorites::Entity")] from = "Column::EstimateId",
CycleFavorites, to = "super::estimates::Column::Id",
#[sea_orm(has_many = "super::cycle_issues::Entity")] on_update = "NoAction",
CycleIssues, on_delete = "NoAction"
#[sea_orm(has_many = "super::cycles::Entity")] )]
Cycles,
#[sea_orm(has_many = "super::estimate_points::Entity")]
EstimatePoints,
#[sea_orm(has_many = "super::estimates::Entity")]
Estimates, Estimates,
#[sea_orm(has_many = "super::github_comment_syncs::Entity")] #[sea_orm(has_many = "super::notifications::Entity")]
GithubCommentSyncs, Notifications,
#[sea_orm(has_many = "super::github_issue_syncs::Entity")] #[sea_orm(
GithubIssueSyncs, belongs_to = "super::states::Entity",
#[sea_orm(has_many = "super::github_repositories::Entity")] from = "Column::DefaultStateId",
GithubRepositories, to = "super::states::Column::Id",
#[sea_orm(has_many = "super::github_repository_syncs::Entity")] on_update = "NoAction",
GithubRepositorySyncs, on_delete = "NoAction"
#[sea_orm(has_many = "super::importers::Entity")] )]
Importers,
#[sea_orm(has_many = "super::inbox_issues::Entity")]
InboxIssues,
#[sea_orm(has_many = "super::inboxes::Entity")]
Inboxes,
#[sea_orm(has_many = "super::issue_activities::Entity")]
IssueActivities,
#[sea_orm(has_many = "super::issue_assignees::Entity")]
IssueAssignees,
#[sea_orm(has_many = "super::issue_attachments::Entity")]
IssueAttachments,
#[sea_orm(has_many = "super::issue_blockers::Entity")]
IssueBlockers,
#[sea_orm(has_many = "super::issue_comments::Entity")]
IssueComments,
#[sea_orm(has_many = "super::issue_labels::Entity")]
IssueLabels,
#[sea_orm(has_many = "super::issue_links::Entity")]
IssueLinks,
#[sea_orm(has_many = "super::issue_mentions::Entity")]
IssueMentions,
#[sea_orm(has_many = "super::issue_properties::Entity")]
IssueProperties,
#[sea_orm(has_many = "super::issue_reactions::Entity")]
IssueReactions,
#[sea_orm(has_many = "super::issue_relations::Entity")]
IssueRelations,
#[sea_orm(has_many = "super::issue_sequences::Entity")]
IssueSequences,
#[sea_orm(has_many = "super::issue_subscribers::Entity")]
IssueSubscribers,
#[sea_orm(has_many = "super::issue_views::Entity")]
IssueViews,
#[sea_orm(has_many = "super::issue_votes::Entity")]
IssueVotes,
#[sea_orm(has_many = "super::issues::Entity")]
Issues,
#[sea_orm(has_many = "super::labels::Entity")]
Labels,
#[sea_orm(has_many = "super::module_favorites::Entity")]
ModuleFavorites,
#[sea_orm(has_many = "super::module_issues::Entity")]
ModuleIssues,
#[sea_orm(has_many = "super::module_links::Entity")]
ModuleLinks,
#[sea_orm(has_many = "super::module_members::Entity")]
ModuleMembers,
#[sea_orm(has_many = "super::modules::Entity")]
Modules,
#[sea_orm(has_many = "super::page_blocks::Entity")]
PageBlocks,
#[sea_orm(has_many = "super::page_favorites::Entity")]
PageFavorites,
#[sea_orm(has_many = "super::page_labels::Entity")]
PageLabels,
#[sea_orm(has_many = "super::page_logs::Entity")]
PageLogs,
#[sea_orm(has_many = "super::pages::Entity")]
Pages,
#[sea_orm(has_many = "super::project_deploy_boards::Entity")]
ProjectDeployBoards,
#[sea_orm(has_many = "super::project_favorites::Entity")]
ProjectFavorites,
#[sea_orm(has_many = "super::project_identifiers::Entity")]
ProjectIdentifiers,
#[sea_orm(has_many = "super::project_member_invites::Entity")]
ProjectMemberInvites,
#[sea_orm(has_many = "super::project_members::Entity")]
ProjectMembers,
#[sea_orm(has_many = "super::project_public_members::Entity")]
ProjectPublicMembers,
#[sea_orm(has_many = "super::slack_project_syncs::Entity")]
SlackProjectSyncs,
#[sea_orm(has_many = "super::states::Entity")]
States, States,
#[sea_orm(has_many = "super::view_favorites::Entity")] #[sea_orm(
ViewFavorites, belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users4,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::DefaultAssigneeId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::ProjectLeadId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -146,37 +98,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::comment_reactions::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::CommentReactions.def() on_update = "NoAction",
} on_delete = "NoAction"
} )]
Workspaces1,
impl Related<super::cycle_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::CycleFavorites.def()
}
}
impl Related<super::cycle_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::CycleIssues.def()
}
}
impl Related<super::cycles::Entity> for Entity {
fn to() -> RelationDef {
Relation::Cycles.def()
}
}
impl Related<super::estimate_points::Entity> for Entity {
fn to() -> RelationDef {
Relation::EstimatePoints.def()
}
} }
impl Related<super::estimates::Entity> for Entity { impl Related<super::estimates::Entity> for Entity {
@ -185,249 +115,9 @@ impl Related<super::estimates::Entity> for Entity {
} }
} }
impl Related<super::github_comment_syncs::Entity> for Entity { impl Related<super::notifications::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::GithubCommentSyncs.def() Relation::Notifications.def()
}
}
impl Related<super::github_issue_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubIssueSyncs.def()
}
}
impl Related<super::github_repositories::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubRepositories.def()
}
}
impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubRepositorySyncs.def()
}
}
impl Related<super::importers::Entity> for Entity {
fn to() -> RelationDef {
Relation::Importers.def()
}
}
impl Related<super::inbox_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::InboxIssues.def()
}
}
impl Related<super::inboxes::Entity> for Entity {
fn to() -> RelationDef {
Relation::Inboxes.def()
}
}
impl Related<super::issue_activities::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueActivities.def()
}
}
impl Related<super::issue_assignees::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueAssignees.def()
}
}
impl Related<super::issue_attachments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueAttachments.def()
}
}
impl Related<super::issue_blockers::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueBlockers.def()
}
}
impl Related<super::issue_comments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueComments.def()
}
}
impl Related<super::issue_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLabels.def()
}
}
impl Related<super::issue_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLinks.def()
}
}
impl Related<super::issue_mentions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueMentions.def()
}
}
impl Related<super::issue_properties::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueProperties.def()
}
}
impl Related<super::issue_reactions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueReactions.def()
}
}
impl Related<super::issue_relations::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueRelations.def()
}
}
impl Related<super::issue_sequences::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueSequences.def()
}
}
impl Related<super::issue_subscribers::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueSubscribers.def()
}
}
impl Related<super::issue_views::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueViews.def()
}
}
impl Related<super::issue_votes::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueVotes.def()
}
}
impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::Issues.def()
}
}
impl Related<super::labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::Labels.def()
}
}
impl Related<super::module_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleFavorites.def()
}
}
impl Related<super::module_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleIssues.def()
}
}
impl Related<super::module_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleLinks.def()
}
}
impl Related<super::module_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleMembers.def()
}
}
impl Related<super::modules::Entity> for Entity {
fn to() -> RelationDef {
Relation::Modules.def()
}
}
impl Related<super::page_blocks::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageBlocks.def()
}
}
impl Related<super::page_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageFavorites.def()
}
}
impl Related<super::page_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLabels.def()
}
}
impl Related<super::page_logs::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLogs.def()
}
}
impl Related<super::pages::Entity> for Entity {
fn to() -> RelationDef {
Relation::Pages.def()
}
}
impl Related<super::project_deploy_boards::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectDeployBoards.def()
}
}
impl Related<super::project_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectFavorites.def()
}
}
impl Related<super::project_identifiers::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectIdentifiers.def()
}
}
impl Related<super::project_member_invites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectMemberInvites.def()
}
}
impl Related<super::project_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectMembers.def()
}
}
impl Related<super::project_public_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectPublicMembers.def()
}
}
impl Related<super::slack_project_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::SlackProjectSyncs.def()
} }
} }
@ -437,16 +127,4 @@ impl Related<super::states::Entity> for Entity {
} }
} }
impl Related<super::view_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ViewFavorites.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -35,7 +35,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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::workspace_integrations::Entity",
from = "Column::WorkspaceIntegrationId",
to = "super::workspace_integrations::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
WorkspaceIntegrations,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -43,18 +75,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::workspace_integrations::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::WorkspaceIntegrations.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -23,6 +23,31 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -29,6 +29,8 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::issues::Entity")]
Issues,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -36,7 +38,31 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -44,18 +70,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::Issues.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -19,6 +19,38 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::teams::Entity",
from = "Column::TeamId",
to = "super::teams::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Teams,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MemberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -26,12 +58,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::teams::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::Teams.def()
} }
} }

View File

@ -20,6 +20,24 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::team_members::Entity")]
TeamMembers,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -27,12 +45,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::team_members::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::TeamMembers.def()
} }
} }

View File

@ -9,10 +9,26 @@ pub struct Model {
#[sea_orm(primary_key)] #[sea_orm(primary_key)]
pub id: i64, pub id: i64,
pub blacklisted_at: DateTimeWithTimeZone, pub blacklisted_at: DateTimeWithTimeZone,
#[sea_orm(unique)]
pub token_id: i64, pub token_id: i64,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::token_blacklist_outstandingtoken::Entity",
from = "Column::TokenId",
to = "super::token_blacklist_outstandingtoken::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
TokenBlacklistOutstandingtoken,
}
impl Related<super::token_blacklist_outstandingtoken::Entity> for Entity {
fn to() -> RelationDef {
Relation::TokenBlacklistOutstandingtoken.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,10 +13,34 @@ pub struct Model {
pub created_at: Option<DateTimeWithTimeZone>, pub created_at: Option<DateTimeWithTimeZone>,
pub expires_at: DateTimeWithTimeZone, pub expires_at: DateTimeWithTimeZone,
pub user_id: Option<Uuid>, pub user_id: Option<Uuid>,
#[sea_orm(unique)]
pub jti: String, pub jti: String,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(has_one = "super::token_blacklist_blacklistedtoken::Entity")]
TokenBlacklistBlacklistedtoken,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users,
}
impl Related<super::token_blacklist_blacklistedtoken::Entity> for Entity {
fn to() -> RelationDef {
Relation::TokenBlacklistBlacklistedtoken.def()
}
}
impl Related<super::users::Entity> for Entity {
fn to() -> RelationDef {
Relation::Users.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -10,8 +10,10 @@ pub struct Model {
pub last_login: Option<DateTimeWithTimeZone>, pub last_login: Option<DateTimeWithTimeZone>,
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid, pub id: Uuid,
#[sea_orm(unique)]
pub username: String, pub username: String,
pub mobile_number: Option<String>, pub mobile_number: Option<String>,
#[sea_orm(unique)]
pub email: Option<String>, pub email: Option<String>,
pub first_name: String, pub first_name: String,
pub last_name: String, pub last_name: String,
@ -62,37 +64,29 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::api_tokens::Entity")] #[sea_orm(has_many = "super::token_blacklist_outstandingtoken::Entity")]
ApiTokens, TokenBlacklistOutstandingtoken,
#[sea_orm(has_many = "super::authtoken_token::Entity")] #[sea_orm(has_many = "super::users_groups::Entity")]
AuthtokenToken, UsersGroups,
#[sea_orm(has_many = "super::cycle_favorites::Entity")] #[sea_orm(has_many = "super::users_user_permissions::Entity")]
CycleFavorites, UsersUserPermissions,
#[sea_orm(has_many = "super::workspaces::Entity")]
Workspaces,
} }
impl Related<super::api_tokens::Entity> for Entity { impl Related<super::token_blacklist_outstandingtoken::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::ApiTokens.def() Relation::TokenBlacklistOutstandingtoken.def()
} }
} }
impl Related<super::authtoken_token::Entity> for Entity { impl Related<super::users_groups::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::AuthtokenToken.def() Relation::UsersGroups.def()
} }
} }
impl Related<super::cycle_favorites::Entity> for Entity { impl Related<super::users_user_permissions::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::CycleFavorites.def() Relation::UsersUserPermissions.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -13,6 +13,35 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::auth_group::Entity",
from = "Column::GroupId",
to = "super::auth_group::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
AuthGroup,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users,
}
impl Related<super::auth_group::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthGroup.def()
}
}
impl Related<super::users::Entity> for Entity {
fn to() -> RelationDef {
Relation::Users.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -13,6 +13,35 @@ pub struct Model {
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {} pub enum Relation {
#[sea_orm(
belongs_to = "super::auth_permission::Entity",
from = "Column::PermissionId",
to = "super::auth_permission::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
AuthPermission,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users,
}
impl Related<super::auth_permission::Entity> for Entity {
fn to() -> RelationDef {
Relation::AuthPermission.def()
}
}
impl Related<super::users::Entity> for Entity {
fn to() -> RelationDef {
Relation::Users.def()
}
}
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -20,6 +20,14 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::issue_views::Entity",
from = "Column::ViewId",
to = "super::issue_views::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
IssueViews,
#[sea_orm( #[sea_orm(
belongs_to = "super::projects::Entity", belongs_to = "super::projects::Entity",
from = "Column::ProjectId", from = "Column::ProjectId",
@ -27,7 +35,39 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Projects, 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"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UpdatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users2,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::UserId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users1,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -35,18 +75,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::projects::Entity> for Entity { impl Related<super::issue_views::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Projects.def() Relation::IssueViews.def()
}
}
impl Related<super::workspaces::Entity> for Entity {
fn to() -> RelationDef {
Relation::Workspaces.def()
} }
} }

View File

@ -31,6 +31,30 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[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::webhooks::Entity",
from = "Column::WebhookId",
to = "super::webhooks::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Webhooks,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -38,12 +62,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::webhooks::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::Webhooks.def()
} }
} }

View File

@ -25,6 +25,24 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[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(has_many = "super::webhook_logs::Entity")]
WebhookLogs,
#[sea_orm( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -32,12 +50,20 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::webhook_logs::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::WebhookLogs.def()
} }
} }

View File

@ -24,6 +24,50 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::api_tokens::Entity",
from = "Column::ApiTokenId",
to = "super::api_tokens::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
ApiTokens,
#[sea_orm(has_many = "super::github_repository_syncs::Entity")]
GithubRepositorySyncs,
#[sea_orm(
belongs_to = "super::integrations::Entity",
from = "Column::IntegrationId",
to = "super::integrations::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Integrations,
#[sea_orm(has_many = "super::slack_project_syncs::Entity")]
SlackProjectSyncs,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -31,12 +75,38 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, 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<super::workspaces::Entity> for Entity { impl Related<super::api_tokens::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::Workspaces.def() Relation::ApiTokens.def()
}
}
impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubRepositorySyncs.def()
}
}
impl Related<super::integrations::Entity> for Entity {
fn to() -> RelationDef {
Relation::Integrations.def()
}
}
impl Related<super::slack_project_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::SlackProjectSyncs.def()
} }
} }

View File

@ -26,6 +26,22 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -33,13 +49,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -30,6 +30,30 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::CreatedById",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::MemberId",
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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -37,13 +61,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -21,6 +21,30 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(
belongs_to = "super::users::Entity",
from = "Column::ActorId",
to = "super::users::Column::Id",
on_update = "NoAction",
on_delete = "NoAction"
)]
Users3,
#[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( #[sea_orm(
belongs_to = "super::workspaces::Entity", belongs_to = "super::workspaces::Entity",
from = "Column::WorkspaceId", from = "Column::WorkspaceId",
@ -28,13 +52,15 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Workspaces, Workspaces2,
} #[sea_orm(
belongs_to = "super::workspaces::Entity",
impl Related<super::workspaces::Entity> for Entity { from = "Column::WorkspaceId",
fn to() -> RelationDef { to = "super::workspaces::Column::Id",
Relation::Workspaces.def() on_update = "NoAction",
} on_delete = "NoAction"
)]
Workspaces1,
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}

View File

@ -12,6 +12,7 @@ pub struct Model {
pub id: Uuid, pub id: Uuid,
pub name: String, pub name: String,
pub logo: Option<String>, pub logo: Option<String>,
#[sea_orm(unique)]
pub slug: String, pub slug: String,
pub created_by_id: Option<Uuid>, pub created_by_id: Option<Uuid>,
pub owner_id: Uuid, pub owner_id: Uuid,
@ -21,114 +22,18 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation { pub enum Relation {
#[sea_orm(has_many = "super::analytic_views::Entity")] #[sea_orm(has_many = "super::file_assets::Entity")]
AnalyticViews, FileAssets,
#[sea_orm(has_many = "super::comment_reactions::Entity")] #[sea_orm(has_many = "super::project_identifiers::Entity")]
CommentReactions, ProjectIdentifiers,
#[sea_orm(has_many = "super::cycle_favorites::Entity")] #[sea_orm(
CycleFavorites, belongs_to = "super::users::Entity",
#[sea_orm(has_many = "super::cycle_issues::Entity")] from = "Column::CreatedById",
CycleIssues, to = "super::users::Column::Id",
#[sea_orm(has_many = "super::cycles::Entity")] on_update = "NoAction",
Cycles, on_delete = "NoAction"
#[sea_orm(has_many = "super::estimate_points::Entity")] )]
EstimatePoints, Users4,
#[sea_orm(has_many = "super::estimates::Entity")]
Estimates,
#[sea_orm(has_many = "super::exporters::Entity")]
Exporters,
#[sea_orm(has_many = "super::github_comment_syncs::Entity")]
GithubCommentSyncs,
#[sea_orm(has_many = "super::github_issue_syncs::Entity")]
GithubIssueSyncs,
#[sea_orm(has_many = "super::github_repositories::Entity")]
GithubRepositories,
#[sea_orm(has_many = "super::github_repository_syncs::Entity")]
GithubRepositorySyncs,
#[sea_orm(has_many = "super::global_views::Entity")]
GlobalViews,
#[sea_orm(has_many = "super::importers::Entity")]
Importers,
#[sea_orm(has_many = "super::inbox_issues::Entity")]
InboxIssues,
#[sea_orm(has_many = "super::inboxes::Entity")]
Inboxes,
#[sea_orm(has_many = "super::issue_activities::Entity")]
IssueActivities,
#[sea_orm(has_many = "super::issue_assignees::Entity")]
IssueAssignees,
#[sea_orm(has_many = "super::issue_attachments::Entity")]
IssueAttachments,
#[sea_orm(has_many = "super::issue_blockers::Entity")]
IssueBlockers,
#[sea_orm(has_many = "super::issue_comments::Entity")]
IssueComments,
#[sea_orm(has_many = "super::issue_labels::Entity")]
IssueLabels,
#[sea_orm(has_many = "super::issue_links::Entity")]
IssueLinks,
#[sea_orm(has_many = "super::issue_mentions::Entity")]
IssueMentions,
#[sea_orm(has_many = "super::issue_properties::Entity")]
IssueProperties,
#[sea_orm(has_many = "super::issue_reactions::Entity")]
IssueReactions,
#[sea_orm(has_many = "super::issue_relations::Entity")]
IssueRelations,
#[sea_orm(has_many = "super::issue_sequences::Entity")]
IssueSequences,
#[sea_orm(has_many = "super::issue_subscribers::Entity")]
IssueSubscribers,
#[sea_orm(has_many = "super::issue_views::Entity")]
IssueViews,
#[sea_orm(has_many = "super::issue_votes::Entity")]
IssueVotes,
#[sea_orm(has_many = "super::issues::Entity")]
Issues,
#[sea_orm(has_many = "super::labels::Entity")]
Labels,
#[sea_orm(has_many = "super::module_favorites::Entity")]
ModuleFavorites,
#[sea_orm(has_many = "super::module_issues::Entity")]
ModuleIssues,
#[sea_orm(has_many = "super::module_links::Entity")]
ModuleLinks,
#[sea_orm(has_many = "super::module_members::Entity")]
ModuleMembers,
#[sea_orm(has_many = "super::modules::Entity")]
Modules,
#[sea_orm(has_many = "super::notifications::Entity")]
Notifications,
#[sea_orm(has_many = "super::page_blocks::Entity")]
PageBlocks,
#[sea_orm(has_many = "super::page_favorites::Entity")]
PageFavorites,
#[sea_orm(has_many = "super::page_labels::Entity")]
PageLabels,
#[sea_orm(has_many = "super::page_logs::Entity")]
PageLogs,
#[sea_orm(has_many = "super::pages::Entity")]
Pages,
#[sea_orm(has_many = "super::project_deploy_boards::Entity")]
ProjectDeployBoards,
#[sea_orm(has_many = "super::project_favorites::Entity")]
ProjectFavorites,
#[sea_orm(has_many = "super::project_member_invites::Entity")]
ProjectMemberInvites,
#[sea_orm(has_many = "super::project_members::Entity")]
ProjectMembers,
#[sea_orm(has_many = "super::project_public_members::Entity")]
ProjectPublicMembers,
#[sea_orm(has_many = "super::projects::Entity")]
Projects,
#[sea_orm(has_many = "super::slack_project_syncs::Entity")]
SlackProjectSyncs,
#[sea_orm(has_many = "super::states::Entity")]
States,
#[sea_orm(has_many = "super::team_members::Entity")]
TeamMembers,
#[sea_orm(has_many = "super::teams::Entity")]
Teams,
#[sea_orm( #[sea_orm(
belongs_to = "super::users::Entity", belongs_to = "super::users::Entity",
from = "Column::OwnerId", from = "Column::OwnerId",
@ -136,392 +41,34 @@ pub enum Relation {
on_update = "NoAction", on_update = "NoAction",
on_delete = "NoAction" on_delete = "NoAction"
)] )]
Users, Users3,
#[sea_orm(has_many = "super::view_favorites::Entity")] #[sea_orm(
ViewFavorites, belongs_to = "super::users::Entity",
#[sea_orm(has_many = "super::webhook_logs::Entity")] from = "Column::UpdatedById",
WebhookLogs, to = "super::users::Column::Id",
#[sea_orm(has_many = "super::webhooks::Entity")] on_update = "NoAction",
Webhooks, on_delete = "NoAction"
#[sea_orm(has_many = "super::workspace_integrations::Entity")] )]
WorkspaceIntegrations, Users2,
#[sea_orm(has_many = "super::workspace_member_invites::Entity")] #[sea_orm(
WorkspaceMemberInvites, belongs_to = "super::users::Entity",
#[sea_orm(has_many = "super::workspace_members::Entity")] from = "Column::OwnerId",
WorkspaceMembers, to = "super::users::Column::Id",
#[sea_orm(has_many = "super::workspace_themes::Entity")] on_update = "NoAction",
WorkspaceThemes, on_delete = "NoAction"
)]
Users1,
} }
impl Related<super::analytic_views::Entity> for Entity { impl Related<super::file_assets::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::AnalyticViews.def() Relation::FileAssets.def()
} }
} }
impl Related<super::comment_reactions::Entity> for Entity { impl Related<super::project_identifiers::Entity> for Entity {
fn to() -> RelationDef { fn to() -> RelationDef {
Relation::CommentReactions.def() Relation::ProjectIdentifiers.def()
}
}
impl Related<super::cycle_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::CycleFavorites.def()
}
}
impl Related<super::cycle_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::CycleIssues.def()
}
}
impl Related<super::cycles::Entity> for Entity {
fn to() -> RelationDef {
Relation::Cycles.def()
}
}
impl Related<super::estimate_points::Entity> for Entity {
fn to() -> RelationDef {
Relation::EstimatePoints.def()
}
}
impl Related<super::estimates::Entity> for Entity {
fn to() -> RelationDef {
Relation::Estimates.def()
}
}
impl Related<super::exporters::Entity> for Entity {
fn to() -> RelationDef {
Relation::Exporters.def()
}
}
impl Related<super::github_comment_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubCommentSyncs.def()
}
}
impl Related<super::github_issue_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubIssueSyncs.def()
}
}
impl Related<super::github_repositories::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubRepositories.def()
}
}
impl Related<super::github_repository_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::GithubRepositorySyncs.def()
}
}
impl Related<super::global_views::Entity> for Entity {
fn to() -> RelationDef {
Relation::GlobalViews.def()
}
}
impl Related<super::importers::Entity> for Entity {
fn to() -> RelationDef {
Relation::Importers.def()
}
}
impl Related<super::inbox_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::InboxIssues.def()
}
}
impl Related<super::inboxes::Entity> for Entity {
fn to() -> RelationDef {
Relation::Inboxes.def()
}
}
impl Related<super::issue_activities::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueActivities.def()
}
}
impl Related<super::issue_assignees::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueAssignees.def()
}
}
impl Related<super::issue_attachments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueAttachments.def()
}
}
impl Related<super::issue_blockers::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueBlockers.def()
}
}
impl Related<super::issue_comments::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueComments.def()
}
}
impl Related<super::issue_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLabels.def()
}
}
impl Related<super::issue_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueLinks.def()
}
}
impl Related<super::issue_mentions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueMentions.def()
}
}
impl Related<super::issue_properties::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueProperties.def()
}
}
impl Related<super::issue_reactions::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueReactions.def()
}
}
impl Related<super::issue_relations::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueRelations.def()
}
}
impl Related<super::issue_sequences::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueSequences.def()
}
}
impl Related<super::issue_subscribers::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueSubscribers.def()
}
}
impl Related<super::issue_views::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueViews.def()
}
}
impl Related<super::issue_votes::Entity> for Entity {
fn to() -> RelationDef {
Relation::IssueVotes.def()
}
}
impl Related<super::issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::Issues.def()
}
}
impl Related<super::labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::Labels.def()
}
}
impl Related<super::module_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleFavorites.def()
}
}
impl Related<super::module_issues::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleIssues.def()
}
}
impl Related<super::module_links::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleLinks.def()
}
}
impl Related<super::module_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ModuleMembers.def()
}
}
impl Related<super::modules::Entity> for Entity {
fn to() -> RelationDef {
Relation::Modules.def()
}
}
impl Related<super::notifications::Entity> for Entity {
fn to() -> RelationDef {
Relation::Notifications.def()
}
}
impl Related<super::page_blocks::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageBlocks.def()
}
}
impl Related<super::page_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageFavorites.def()
}
}
impl Related<super::page_labels::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLabels.def()
}
}
impl Related<super::page_logs::Entity> for Entity {
fn to() -> RelationDef {
Relation::PageLogs.def()
}
}
impl Related<super::pages::Entity> for Entity {
fn to() -> RelationDef {
Relation::Pages.def()
}
}
impl Related<super::project_deploy_boards::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectDeployBoards.def()
}
}
impl Related<super::project_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectFavorites.def()
}
}
impl Related<super::project_member_invites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectMemberInvites.def()
}
}
impl Related<super::project_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectMembers.def()
}
}
impl Related<super::project_public_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::ProjectPublicMembers.def()
}
}
impl Related<super::projects::Entity> for Entity {
fn to() -> RelationDef {
Relation::Projects.def()
}
}
impl Related<super::slack_project_syncs::Entity> for Entity {
fn to() -> RelationDef {
Relation::SlackProjectSyncs.def()
}
}
impl Related<super::states::Entity> for Entity {
fn to() -> RelationDef {
Relation::States.def()
}
}
impl Related<super::team_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::TeamMembers.def()
}
}
impl Related<super::teams::Entity> for Entity {
fn to() -> RelationDef {
Relation::Teams.def()
}
}
impl Related<super::users::Entity> for Entity {
fn to() -> RelationDef {
Relation::Users.def()
}
}
impl Related<super::view_favorites::Entity> for Entity {
fn to() -> RelationDef {
Relation::ViewFavorites.def()
}
}
impl Related<super::webhook_logs::Entity> for Entity {
fn to() -> RelationDef {
Relation::WebhookLogs.def()
}
}
impl Related<super::webhooks::Entity> for Entity {
fn to() -> RelationDef {
Relation::Webhooks.def()
}
}
impl Related<super::workspace_integrations::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceIntegrations.def()
}
}
impl Related<super::workspace_member_invites::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceMemberInvites.def()
}
}
impl Related<super::workspace_members::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceMembers.def()
}
}
impl Related<super::workspace_themes::Entity> for Entity {
fn to() -> RelationDef {
Relation::WorkspaceThemes.def()
} }
} }

View File

@ -1,3 +1,5 @@
pub mod require_instance; pub mod require_instance;
pub mod user;
pub use require_instance::*; pub use require_instance::*;
pub use user::*;

View File

@ -18,6 +18,7 @@ use validators_prelude::Host;
use crate::models::{Error, JsonError}; use crate::models::{Error, JsonError};
use crate::session::AppClaims; use crate::session::AppClaims;
mod api_tokens;
mod change_password; mod change_password;
mod email_check; mod email_check;
mod forgot_password; mod forgot_password;
@ -65,7 +66,10 @@ pub fn configure(http_client: reqwest::Client, config: &mut ServiceConfig) {
.service(change_password::change_password) .service(change_password::change_password)
.service(forgot_password::forgot_password) .service(forgot_password::forgot_password)
.configure(|c| { .configure(|c| {
social_auth::configure(http_client, c); social_auth::configure(http_client.clone(), c);
})
.configure(|c| {
api_tokens::configure(http_client.clone(), c);
}), }),
); );
} }

View File

@ -10,17 +10,29 @@ pub use {deadpool_redis, redis, rumqttc, serde};
pub type Id = Uuid; pub type Id = Uuid;
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)] #[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct MagicLinkKey(String); pub struct MagicLinkKey(String);
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)] #[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct MagicLinkToken(String); pub struct MagicLinkToken(String);
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)] #[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct UserId(pub Id); pub struct UserId(pub Id);
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)] #[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct IssueId(pub Id); pub struct IssueId(pub Id);
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct ApiTokenId(pub Id);
#[derive(Debug, PartialEq, Serialize, Deserialize, Deref, Constructor)]
#[serde(transparent)]
pub struct WorkspaceSlug(pub String);
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct IssueDetails { pub struct IssueDetails {
pub name: String, pub name: String,

File diff suppressed because it is too large Load Diff