Class Product
A product sold by Gastrosky Sagl. Could be a Booster, could be a PremiumUpgrade, but NO BUNDLES! Only single, atomic entries for every product sold! Can be accumulated in an Order.
[PrimaryKey("SKU", new string[] { })]
[Table("Products")]
[Index("ArchivalTimestampUTC", new string[] { })]
public class Product
- Inheritance
-
Product
- Derived
- Inherited Members
Properties
ArchivalTimestampUTC
Unix-timestamp of when this Product was archived.
If this is not null, the Product was deleted and is no longer available for sale!
public long? ArchivalTimestampUTC { get; set; }
Property Value
- long?
CreationTimestampUTC
Unix-timestamp of when this Product was added to Gastrosky's repertoire.
public long CreationTimestampUTC { get; set; }
Property Value
Currency
The base currency under which this Product is sold. Default is CHF.
[MaxLength(4)]
public required string Currency { get; set; }
Property Value
Remarks
ISO 4217 string of the currency this Product is published under. E.g. CHF
GTIN
Global Trade Item Number (if available).
[Column("GTIN")]
public string? GTIN { get; set; }
Property Value
Remarks
See Global Trade Item Number (Wikipedia) for more details.
Orders
public ICollection<OrderedProduct> Orders { get; set; }
Property Value
SKU
Stock-keeping unit that uniquely identifies a product sold by Gastrosky Sagl. This is also the primary key in the DB.
[Key]
[Column("SKU")]
public string SKU { get; set; }
Property Value
SalePriceSubunit
Sub-unit of the Booster price.
This is the amount of money that needs to be paid in order for the Product to be activated/delivered for the customer.
public long SalePriceSubunit { get; set; }
Property Value
Remarks
E.g. 1 CHF would be 100 sub-units. This is to remove the floating point and maintain precision and performance.
It is even required to be this way by many payment gateway APIs such as Stripe.
Version
public int Version { get; set; }