move live source ownership to accounts

This commit is contained in:
2026-07-18 22:24:00 -07:00
parent 1598d3c403
commit 53ae90ec13
20 changed files with 219 additions and 124 deletions
+6 -3
View File
@@ -84,7 +84,10 @@ pub struct ComponentInstance {
pub id: Uuid,
#[serde(skip_serializing)]
pub owner_id: Uuid,
pub source_id: Uuid,
/// Runtime identity of the owner's account-level source. This value is
/// derived while loading the component and is not stored on its row.
#[serde(rename = "sourceId")]
pub account_source_id: Uuid,
pub kind: String,
pub name: String,
pub enabled: bool,
@@ -95,7 +98,7 @@ pub struct ComponentInstance {
impl ComponentInstance {
pub fn new(
owner_id: Uuid,
source_id: Uuid,
account_source_id: Uuid,
kind: impl Into<String>,
name: impl Into<String>,
settings_version: u32,
@@ -104,7 +107,7 @@ impl ComponentInstance {
Self {
id: Uuid::new_v4(),
owner_id,
source_id,
account_source_id,
kind: kind.into(),
name: name.into(),
enabled: true,