Update git remote URL from git.threefold.info to git.ourworld.tf

This commit is contained in:
2025-08-04 10:44:17 +02:00
parent 0cf66642a2
commit aa7e79d26c
85 changed files with 1865 additions and 392 deletions

View File

@@ -1,44 +1,39 @@
module biz
import base
import freeflowuniverse.herolib.data.ourtime
import freeflowuniverse.herolib.hero.models.core
import freeflowuniverse.herolib.data.currency
// import freeflowuniverse.herolib.core.texttools { name_fix }
// Product represents goods or services offered by a company
pub struct Product {
core.Base
pub mut:
name string
description string
price f64
type_ ProductType
category string
status ProductStatus
max_amount u16
purchase_till u64 // Unix timestamp
active_till u64 // Unix timestamp
components []ProductComponent
}
// ProductType represents the type of a product
// ProductComponent represents sub-parts of a complex product
pub struct ProductComponent {
pub mut:
name string
description string
quantity u32
}
// ProductType differentiates between products and services
pub enum ProductType {
product
service
}
// ProductStatus represents the status of a product
// ProductStatus indicates availability
pub enum ProductStatus {
available
unavailable
}
// ProductComponent represents a component or sub-part of a product.
// Its lifecycle is tied to the parent Product and it does not have its own independent ID.
pub struct ProductComponent {
pub mut:
name string
description string
quantity int
}
// Product represents a product or service offered
pub struct Product {
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
name string
description string
price currency.Currency
type_ ProductType
category string
status ProductStatus
max_amount u16 // Maximum available quantity of this product, if applicable
purchase_till ourtime.OurTime // Date until which this product can be purchased
active_till ourtime.OurTime // Date until which this product/service remains active (e.g., for subscriptions)
components []ProductComponent // List of components that make up this product
}