workspace reshape

This commit is contained in:
2026-06-16 19:11:41 +01:00
parent ccb891d688
commit b2ad096f95
17 changed files with 3160 additions and 56 deletions
+28
View File
@@ -0,0 +1,28 @@
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "stream_key")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
#[sea_orm(unique)]
pub key_value: String,
pub label: String,
pub is_active: bool,
pub created_at: DateTimeUtc,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::stream_session::Entity")]
StreamSession,
}
impl Related<super::stream_session::Entity> for Entity {
fn to() -> RelationDef {
Relation::StreamSession.def()
}
}
impl ActiveModelBehavior for ActiveModel {}