From e93736be6175138677ad14fe1648fced8721f57d Mon Sep 17 00:00:00 2001 From: Sundog Date: Thu, 19 Oct 2023 16:17:48 -0400 Subject: [PATCH] more updates to MODELS --- MODELS.md | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/MODELS.md b/MODELS.md index a172dbd..2566619 100644 --- a/MODELS.md +++ b/MODELS.md @@ -354,6 +354,34 @@ struct Image { } ``` +# Video + +A Video represents a video file that a Person wants to reference from a Label, an Artist, an Album, a Track, a Playlist, or an Article. + +``` rust +struct VideoId { + id: String, +} +struct Video { + id: VideoId, + name: Option, + path: String, + url: String, + width: usize, + height: usize, + duration: chrono::Duration, + alt_text: String, + is_public: bool, + allow_hotlinking: bool, + created_by: PersonId, + created_at: chrono::DateTime, + modified_by: PersonId, + modified_at: chrono::DateTime, + deleted_by: Option, + deleted_at: Option, +} +``` + # Collection A Collection represents one or more Albums and/or Tracks that are offered together as a package for Purchase @@ -366,17 +394,18 @@ struct Collection { id: CollectionId, name: String, description: String, - created_by: Person, + created_by: PersonId, created_at: chrono::DateTime, modified_by: Person, modified_at: chrono::DateTime, is_public: bool, is_available: bool, - deleted_by: Option, + deleted_by: Option, deleted_at: Option, albums: Option>, tracks: Option>, - price: Oprion, + other_products: Option>, + price: Option, } ``` @@ -392,7 +421,15 @@ struct OtherProduct { id: OtherProductId, name: String, description: String, - + created_by: PersonId, + created_at: chrono::DateTime, + modified_by: PersonId, + modified_at: chrono::DateTime, + is_public: bool, + is_available: bool, + deleted_by: Option, + deleted_at: Option, + price: Option } ``` @@ -419,13 +456,15 @@ struct Sku { track_id: Option, collection_id: Option, other_product_id: Option, + variant: Option, + discount_percentage: Option, + discount_flatrate: Option, } struct PurchaseItem { id: PurchaseItemId, type: PurchaseItemType, - sku: SkuId, + sku: Option, quantity: usize, - discount_percentage: usize, } enum PurchaseState { InCart,