diff --git a/MODELS.md b/MODELS.md index 2566619..8be6a47 100644 --- a/MODELS.md +++ b/MODELS.md @@ -185,7 +185,6 @@ struct Track { is_available: bool, preview_source: Option, source: String, - price: Option, created_by: PersonId, created_at: chrono::DateTime, modified_by: PersonId, @@ -218,7 +217,6 @@ struct Album { is_available: bool, preview_source: Option, source: String, - price: Option, created_by: PersonId, created_at: chrono::DateTime, modified_by: PersonId, @@ -405,7 +403,6 @@ struct Collection { albums: Option>, tracks: Option>, other_products: Option>, - price: Option, } ``` @@ -429,7 +426,7 @@ struct OtherProduct { is_available: bool, deleted_by: Option, deleted_at: Option, - price: Option + requires_shipping: bool, } ``` @@ -457,8 +454,9 @@ struct Sku { collection_id: Option, other_product_id: Option, variant: Option, - discount_percentage: Option, - discount_flatrate: Option, + description: Option, + price: Option, + requires_shipping: bool, } struct PurchaseItem { id: PurchaseItemId, @@ -481,5 +479,35 @@ struct Purchase { state: PurchaseState, purchased_by: Person, purchased_at: Option, + fulfilled_by: Option, + fulfilled_at: Option, } ``` + +# CouponCode + +A CouponCode represents a code a Person can enter to receive a discount on a PurchateItem or on a Purchase. + +``` rust +struct CouponCodeId { + id: String, +} +struct CouponCode { + id: CouponCodeId, + name: String, + code: String, + uses: usize, + max_uses: usize, + expiration: Option, + discount_flat: Option, + discount_percentage: Option, + skus: Option>, + is_active: bool, + created_by: PersonId, + created_at: chrono::DateTime, + modified_by: PersonId, + modified_at: chrono::DateTime, + deleted_by: Option, + deleted_at: Option, +} +``` \ No newline at end of file