forked from MountainTownTechnology/aural_isle
adds OtherProducts and Collections data structures
This commit is contained in:
16
MODELS.md
16
MODELS.md
@ -372,9 +372,14 @@ struct Video {
|
||||
|
||||
# Collection
|
||||
|
||||
A Collection represents one or more Albums and/or Tracks that are offered together as a package for Purchase
|
||||
A Collection represents one or more Albums, Tracks, and/or OtherProducts that are offered together as a package for Purchase
|
||||
|
||||
``` rust
|
||||
enum CollectionItem {
|
||||
Album(AlbumId),
|
||||
Track(TrackId),
|
||||
OtherProduct(OtherProductId),
|
||||
}
|
||||
struct CollectionId {
|
||||
id: String,
|
||||
}
|
||||
@ -390,9 +395,7 @@ struct Collection {
|
||||
is_available: bool,
|
||||
deleted_by: Option<PersonId>,
|
||||
deleted_at: Option<chrono::DateTime>,
|
||||
albums: Option<Vec<Album>>,
|
||||
tracks: Option<Vec<Track>>,
|
||||
other_products: Option<Vec<OtherProduct>>,
|
||||
collection_items: Option<Vec<CollectionMember>>,
|
||||
}
|
||||
```
|
||||
|
||||
@ -422,7 +425,7 @@ struct OtherProduct {
|
||||
|
||||
# Purchase
|
||||
|
||||
A Purchase represents one or more Tracks or Albums that a Person purchases from an Artist or Label through the server.
|
||||
A Purchase represents one or more Tracks, Albums, Collections, and/or OtherProducts that a Person purchases from an Artist or Label through the server.
|
||||
|
||||
``` rust
|
||||
enum PurchaseItemType {
|
||||
@ -444,6 +447,7 @@ struct Sku {
|
||||
description: Option<String>,
|
||||
price: Option<rusty_money::Money>,
|
||||
requires_shipping: bool,
|
||||
shipping_charge: Option<rusty_money::Money>,
|
||||
}
|
||||
struct PurchaseItem {
|
||||
id: PurchaseItemId,
|
||||
@ -467,6 +471,8 @@ struct Purchase {
|
||||
purchased_at: Option<chrono::DateTime>,
|
||||
fulfilled_by: Option<Person>,
|
||||
fulfilled_at: Option<chrono::DateTime>,
|
||||
coupons_applied: Option<Vec<CouponCodeId>>,
|
||||
total_charge: rusty_money::Money,
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user