Refactor database schema: Remove access list and related entities, add editing session and edit operation entities
- Deleted `access_list_entry`, `location`, `proxy_host`, `proxy_host_access_list`, `session`, `stream_service`, `stream_service_access_list` entities and their corresponding migration files. - Introduced `editing_session` and `edit_operation` entities with appropriate fields and relationships. - Updated `mod.rs` and `prelude.rs` to reflect the changes in the entity structure. - Adjusted migration files to remove obsolete migrations and include new migrations for the editing session and edit operation tables.
This commit is contained in:
30
public/database/src/generated/entities/edit_operation.rs
Normal file
30
public/database/src/generated/entities/edit_operation.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0.0-rc.18
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[sea_orm::model]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
||||
#[sea_orm(table_name = "edit_operation")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: Uuid,
|
||||
pub session_id: Uuid,
|
||||
pub resource_type: String,
|
||||
pub resource_id: Option<Uuid>,
|
||||
pub operation_type: String,
|
||||
#[sea_orm(column_type = "JsonBinary")]
|
||||
pub payload: Json,
|
||||
pub created_at: DateTimeUtc,
|
||||
pub applied_at: Option<DateTimeUtc>,
|
||||
#[sea_orm(
|
||||
belongs_to,
|
||||
from = "session_id",
|
||||
to = "id",
|
||||
on_update = "Cascade",
|
||||
on_delete = "Cascade"
|
||||
)]
|
||||
pub editing_session: HasOne<super::editing_session::Entity>,
|
||||
}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
Reference in New Issue
Block a user