Skip to content

Introduce OrderModel and supply/demand protocols for backend - #13

Merged
vdkdamian merged 1 commit into
mainfrom
orderModel
Jun 10, 2026
Merged

Introduce OrderModel and supply/demand protocols for backend#13
vdkdamian merged 1 commit into
mainfrom
orderModel

Conversation

@vdkdamian

Copy link
Copy Markdown
Member

This pull request introduces new protocols and type definitions to support order demand and supply modeling in the backend of the funico-core project. The main focus is on defining clear interfaces for order-related models, including demand and supply specifics, and establishing type aliases for better code clarity and maintainability.

Order modeling protocols:

  • Added OrderModel protocol, which requires conforming types to be Codable, Identifiable, and to have a mutable quantity property (Float) and a read-only createdDate property.
  • Added OrderDemandModel protocol, extending OrderModel and Articlable, introducing properties for quantity (of type Demand), remaining demand, shippingDate, createdDate, and an optional countryCode.
  • Added OrderSupplyModel protocol, also extending OrderModel and Articlable, with a quantity property (of type Supply) and a read-only createdDate.

Type definition:

  • Introduced a type alias Supply as Float within an extension of OrderSupplyModel for clearer semantic usage of supply quantities.

Introduce base OrderModel and specialized OrderSupplyModel and OrderDemandModel protocols for the backend domain. OrderModel is Codable & Identifiable and defines a generic quantity and createdDate. OrderSupplyModel and OrderDemandModel extend OrderModel and Articlable, adding domain-specific quantity types (Supply/Demand), timestamps and an optional countryCode/shippingDate for demands. Also add a Supply typealias (Float) on OrderSupplyModel. These types provide a structured contract for supply/demand orders in the FunicoERP backend.
@vdkdamian
vdkdamian merged commit ecbf4be into main Jun 10, 2026
19 of 20 checks passed
@vdkdamian
vdkdamian deleted the orderModel branch June 10, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant