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,31 +1,34 @@
module finance
import base
pub enum AssetType {
erc20
erc721
erc1155
native
}
import freeflowuniverse.herolib.hero.models.core
// Asset represents any valuable resource owned by an entity
// Can be financial (stocks, bonds) or physical (real estate, commodities)
pub struct Asset {
base.Base
core.Base
pub mut:
name string
description string
amount f64
address string // address of the asset on the blockchain or bank
asset_type AssetType // type of the asset
decimals u8 // number of decimals of the asset
name string // Asset name or identifier
symbol string // Trading symbol or identifier @[index]
asset_type AssetType
quantity f64 // Amount of the asset held
unit_price f64 // Price per unit in the asset's currency
total_value f64 // total_value = quantity * unit_price
currency string // Currency for pricing (USD, EUR, etc.)
category string // Asset category (stocks, bonds, crypto, etc.)
exchange string // Exchange where asset is traded
description string // Detailed description of the asset
is_active bool // Whether the asset is currently tracked
purchase_date u64 // Unix timestamp of purchase/acquisition
}
pub fn (self Asset) index_keys() map[string]string {
return {
'name': self.name
}
}
pub fn (self Asset) ftindex_keys() map[string]string {
return map[string]string{}
// AssetType defines the classification of assets
pub enum AssetType {
stock
bond
crypto
commodity
real_estate
currency
nft
other
}