Skip to content

Instantly share code, notes, and snippets.

@olivier5741
Created December 7, 2023 12:20
Show Gist options
  • Save olivier5741/a7430aa08374d28b3bcc321d292aec10 to your computer and use it in GitHub Desktop.
Save olivier5741/a7430aa08374d28b3bcc321d292aec10 to your computer and use it in GitHub Desktop.
Order typescript overview
class Order {
_id!: ObjectId;
ids?: string[]; // legacy -> use references instead
key?: string;
number?: string;
references?: Reference[]; // references (id) the transaction has on other platforms
name?: string;
// roles
customer?: Party; // can be an enterprise (organisation), one of its activities, a person, a partnership
seller?: Party; // can be an enterprise (organisation), one of its activities, a person, a partnership
// broker?: Party; // maybe use this property to express the actor that helped broker the transaction
// relations
counter?: Counter; // the shop where the transaction happened
subscription?: Subscription;
session?: Session; // the cycle the transaction is linked to
// content
lines?: OrderLine[];
products?: Product[]; // the products referenced in the transaction lines
//fulfilments?: Fulfilment[];
relationships?: Relationship[]; // the relationships (such as customer-seller) of the transaction
categories?: Category[];
tags?: string[];
translations?: I18nBundle;
createdAt?: Date;
updatedAt?: Date;
metadata?: Metadata;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment