Table of Contents

Class Product

Namespace
GastroSky.Models
Assembly
GastroSky.Models.dll

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

long

Currency

The base currency under which this Product is sold. Default is CHF.

[MaxLength(4)]
public required string Currency { get; set; }

Property Value

string

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

string

Remarks

Orders

The Orders that have this Product in its list of purchased items.

public ICollection<OrderedProduct> Orders { get; set; }

Property Value

ICollection<OrderedProduct>

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

string

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

long

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; }

Property Value

int