move live source ownership to accounts
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user