From 9c432381d1ab507a367664d17dc6839a692452a8 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Mon, 19 Feb 2024 14:08:46 -0600 Subject: [PATCH] feat: updated `core_types` to move ownership to `PhotoGroup` --- crates/core_types/src/photo.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/core_types/src/photo.rs b/crates/core_types/src/photo.rs index 6764108..034d8ff 100644 --- a/crates/core_types/src/photo.rs +++ b/crates/core_types/src/photo.rs @@ -18,13 +18,11 @@ pub struct PhotoRecordId(pub ulid::Ulid); #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Photo { /// The record ID. - pub id: PhotoRecordId, - /// The user who created the photo. - pub photographer: UserRecordId, - /// The user who owns the photo. - pub owner: UserRecordId, + pub id: PhotoRecordId, + /// The photo group that contains this photo. + pub group: PhotoGroupRecordId, /// The photo's artifacts. - pub artifacts: PhotoArtifacts, + pub artifacts: PhotoArtifacts, } /// The artifacts for a photo. Not a table. @@ -73,13 +71,15 @@ pub struct PhotoGroupRecordId(pub ulid::Ulid); #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhotoGroup { /// The record ID. - pub id: PhotoGroupRecordId, + pub id: PhotoGroupRecordId, + /// The user who uploaded the photo group. + pub photographer: UserRecordId, /// The user who owns the photo group. - pub owner: UserRecordId, + pub owner: UserRecordId, /// The photos in the group. - pub photos: Vec, + pub photos: Vec, /// Whether the group is publicly visible. - pub public: bool, + pub public: bool, } /// The metadata for uploading a photo group. Not a table.