//! `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 = "workspaces")] pub struct Model { pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub name: String, pub logo: Option, #[sea_orm(unique)] pub slug: String, pub created_by_id: Option, pub owner_id: Uuid, pub updated_by_id: Option, pub organization_size: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::file_assets::Entity")] FileAssets, #[sea_orm(has_many = "super::project_identifiers::Entity")] ProjectIdentifiers, #[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::OwnerId", 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::OwnerId", to = "super::users::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Users1, } impl Related for Entity { fn to() -> RelationDef { Relation::FileAssets.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::ProjectIdentifiers.def() } } impl ActiveModelBehavior for ActiveModel {}