Purge sea-orm leftovers which were unusable

This commit is contained in:
Tom 2022-02-03 15:06:55 +01:00
parent b6a3bea2c4
commit 643aa42cd3
6 changed files with 0 additions and 166 deletions

View file

@ -1,52 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "events")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
pub start_date: String,
pub end_date: Option<String>,
pub description: String,
pub series: String,
pub series_name: String,
pub location: Option<String>,
pub location_name: Option<String>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(
belongs_to = "super::series::Entity",
from = "Column::Series",
to = "super::series::Column::Id",
on_update = "NoAction",
on_delete = "Cascade"
)]
Series,
#[sea_orm(
belongs_to = "super::locations::Entity",
from = "Column::Location",
to = "super::locations::Column::Id",
on_update = "NoAction",
on_delete = "Cascade"
)]
Locations,
}
impl Related<super::series::Entity> for Entity {
fn to() -> RelationDef {
Relation::Series.def()
}
}
impl Related<super::locations::Entity> for Entity {
fn to() -> RelationDef {
Relation::Locations.def()
}
}
impl ActiveModelBehavior for ActiveModel {}

View file

@ -1,35 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "locations")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
pub name: String,
pub description: Option<String>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::sessions::Entity")]
Sessions,
#[sea_orm(has_many = "super::events::Entity")]
Events,
}
impl Related<super::sessions::Entity> for Entity {
fn to() -> RelationDef {
Relation::Sessions.def()
}
}
impl Related<super::events::Entity> for Entity {
fn to() -> RelationDef {
Relation::Events.def()
}
}
impl ActiveModelBehavior for ActiveModel {}

View file

@ -1,8 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
pub mod prelude;
pub mod events;
pub mod locations;
pub mod series;
pub mod sessions;

View file

@ -1,6 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
pub use super::events::Entity as Events;
pub use super::locations::Entity as Locations;
pub use super::series::Entity as Series;
pub use super::sessions::Entity as Sessions;

View file

@ -1,27 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "series")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
pub name: String,
pub description: Option<String>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::events::Entity")]
Events,
}
impl Related<super::events::Entity> for Entity {
fn to() -> RelationDef {
Relation::Events.def()
}
}
impl ActiveModelBehavior for ActiveModel {}

View file

@ -1,38 +0,0 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.5.0
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "sessions")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
pub name: String,
pub start: i32,
pub duration_minutes: Option<i32>,
pub location: Option<String>,
pub location_name: Option<String>,
pub series: String,
pub series_name: String,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(
belongs_to = "super::locations::Entity",
from = "Column::Location",
to = "super::locations::Column::Id",
on_update = "NoAction",
on_delete = "Cascade"
)]
Locations,
}
impl Related<super::locations::Entity> for Entity {
fn to() -> RelationDef {
Relation::Locations.def()
}
}
impl ActiveModelBehavior for ActiveModel {}