Update git remote URL from git.threefold.info to git.ourworld.tf
This commit is contained in:
		@@ -1,15 +0,0 @@
 | 
			
		||||
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
// Attachment represents an attachment usable for any object
 | 
			
		||||
// such as email, chat, etc.
 | 
			
		||||
// It is a generic struct that can be used for any object
 | 
			
		||||
// that requires an attachment.
 | 
			
		||||
 | 
			
		||||
pub struct Attachment {
 | 
			
		||||
pub mut:
 | 
			
		||||
	filename     string
 | 
			
		||||
	content_type string
 | 
			
		||||
	hash         string // Hash of the attachment data
 | 
			
		||||
	size         u32    // Size in bytes
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								specs/models/circle/circle.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								specs/models/circle/circle.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import freeflowuniverse.herolib.hero.models.core
 | 
			
		||||
 | 
			
		||||
// Circle represents a circle entity with configuration and metadata
 | 
			
		||||
@[heap]
 | 
			
		||||
pub struct Circle {
 | 
			
		||||
	core.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	name        string       // Human-readable name of the circle
 | 
			
		||||
	description string       // Detailed description of the circle's purpose
 | 
			
		||||
	domain      string       // Primary domain name for the circle @[index]
 | 
			
		||||
	config      CircleConfig // Configuration settings for the circle
 | 
			
		||||
	status      CircleStatus // Current operational status
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CircleConfig holds configuration settings for a circle
 | 
			
		||||
pub struct CircleConfig {
 | 
			
		||||
pub mut:
 | 
			
		||||
	max_members  u32    // Maximum number of members allowed
 | 
			
		||||
	allow_guests bool   // Whether to allow guest access
 | 
			
		||||
	auto_approve bool   // Whether new members are auto-approved
 | 
			
		||||
	theme        string // Visual theme identifier
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CircleStatus represents the operational status of a circle
 | 
			
		||||
pub enum CircleStatus {
 | 
			
		||||
	active
 | 
			
		||||
	inactive
 | 
			
		||||
	suspended
 | 
			
		||||
	archived
 | 
			
		||||
}
 | 
			
		||||
@@ -1,39 +0,0 @@
 | 
			
		||||
module mcc
 | 
			
		||||
import base
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//there is only 1 of this per circle called "configs"
 | 
			
		||||
pub struct Configs {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	configs  map[string]Config //string is namefixed
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//generic config per circle, can be more than 1
 | 
			
		||||
pub struct Config {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	name string
 | 
			
		||||
	labels  []Label
 | 
			
		||||
	colors []Color
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub struct Label {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	name  string
 | 
			
		||||
	comment string
 | 
			
		||||
	color u16
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
pub struct Color {
 | 
			
		||||
	base.Base	
 | 
			
		||||
pub mut:
 | 
			
		||||
	id    u16
 | 
			
		||||
	name  string
 | 
			
		||||
	comment string
 | 
			
		||||
	colorcode string //hex color code
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1,36 +0,0 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import base
 | 
			
		||||
 | 
			
		||||
// Define the RecordType enum
 | 
			
		||||
pub enum RecordType {
 | 
			
		||||
	a
 | 
			
		||||
	aaa
 | 
			
		||||
	cname
 | 
			
		||||
	mx
 | 
			
		||||
	ns
 | 
			
		||||
	ptr
 | 
			
		||||
	soa
 | 
			
		||||
	srv
 | 
			
		||||
	txt
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Define the DomainNamespace struct, represents a full domain with all its records
 | 
			
		||||
pub struct DomainNameSpace {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	id          u32
 | 
			
		||||
	domain      string
 | 
			
		||||
	description string
 | 
			
		||||
	records     []Record
 | 
			
		||||
	admins      []u32 // IDs of the admins they need to exist as user in the circle
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Define the Record struct
 | 
			
		||||
pub struct Record {
 | 
			
		||||
pub mut:
 | 
			
		||||
	name     string
 | 
			
		||||
	text     string
 | 
			
		||||
	category RecordType
 | 
			
		||||
	addr     []string
 | 
			
		||||
}
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import base
 | 
			
		||||
 | 
			
		||||
// there is one group called "everyone" which is the default group for all members and their roles
 | 
			
		||||
pub struct Group {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	name        string // name of the group in a circle, the one "everyone" is the default group
 | 
			
		||||
	description string // optional description
 | 
			
		||||
	members     []u32  // pointers to the members of this group
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								specs/models/circle/member.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								specs/models/circle/member.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import freeflowuniverse.herolib.hero.models.core
 | 
			
		||||
 | 
			
		||||
// Member represents a member within a circle
 | 
			
		||||
pub struct Member {
 | 
			
		||||
	core.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	circle_id   u32          // Reference to the circle this member belongs to @[index]
 | 
			
		||||
	user_id     u32          // Reference to the user entity @[index]
 | 
			
		||||
	role        MemberRole   // Member's role within the circle
 | 
			
		||||
	status      MemberStatus // Current membership status
 | 
			
		||||
	joined_at   u64          // Unix timestamp when member joined
 | 
			
		||||
	invited_by  u32          // User ID of who invited this member
 | 
			
		||||
	permissions []string     // List of custom permissions
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MemberRole defines the possible roles a member can have
 | 
			
		||||
pub enum MemberRole {
 | 
			
		||||
	owner
 | 
			
		||||
	admin
 | 
			
		||||
	moderator
 | 
			
		||||
	member
 | 
			
		||||
	guest
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MemberStatus represents the current status of membership
 | 
			
		||||
pub enum MemberStatus {
 | 
			
		||||
	active
 | 
			
		||||
	pending
 | 
			
		||||
	suspended
 | 
			
		||||
	removed
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										27
									
								
								specs/models/circle/name.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								specs/models/circle/name.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import freeflowuniverse.herolib.hero.models.core
 | 
			
		||||
 | 
			
		||||
// Name represents a domain name configuration for a circle
 | 
			
		||||
pub struct Name {
 | 
			
		||||
	core.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	circle_id   u32      // Reference to the circle this name belongs to @[index]
 | 
			
		||||
	domain      string   // The actual domain name @[index]
 | 
			
		||||
	subdomain   string   // Optional subdomain
 | 
			
		||||
	record_type NameType // Type of DNS record
 | 
			
		||||
	value       string   // DNS record value/target
 | 
			
		||||
	priority    u32      // Priority for MX records
 | 
			
		||||
	ttl         u32      // Time to live in seconds
 | 
			
		||||
	is_active   bool     // Whether this record is currently active
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NameType defines the supported DNS record types
 | 
			
		||||
pub enum NameType {
 | 
			
		||||
	a
 | 
			
		||||
	aaaa
 | 
			
		||||
	cname
 | 
			
		||||
	mx
 | 
			
		||||
	txt
 | 
			
		||||
	srv
 | 
			
		||||
}
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import freeflowuniverse.herolib.data.ourtime
 | 
			
		||||
import base
 | 
			
		||||
 | 
			
		||||
// Role represents the role of a member in a circle
 | 
			
		||||
pub enum Role {
 | 
			
		||||
	admin
 | 
			
		||||
	stakeholder
 | 
			
		||||
	member
 | 
			
		||||
	contributor
 | 
			
		||||
	guest
 | 
			
		||||
	external // means no right in this circle appart from we register this user
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UserPreferences represents user preferences for MCC
 | 
			
		||||
pub struct UserPreferences {
 | 
			
		||||
pub mut:
 | 
			
		||||
	default_calendar_id u32    // Default calendar ID
 | 
			
		||||
	default_view        string // Default view (day, week, month)
 | 
			
		||||
	email_signature     string // Default email signature
 | 
			
		||||
	theme               string // UI theme preference
 | 
			
		||||
	notifications       bool   // Enable/disable notifications
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// User represents a member of a circle
 | 
			
		||||
pub struct User {
 | 
			
		||||
	base.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	name        string // name of the member as used in this circle
 | 
			
		||||
	description string // optional description which is relevant to this circle
 | 
			
		||||
	role        Role   // role of the member in the circle
 | 
			
		||||
	contact_ids []u32  // IDs of contacts linked to this member
 | 
			
		||||
	wallet_ids  []u32  // IDs of wallets owned by this member which are relevant to this circle
 | 
			
		||||
	pubkey      string // public key of the member as used in this circle
 | 
			
		||||
	
 | 
			
		||||
	// Additional fields needed for MCC functionality
 | 
			
		||||
	email       string // Primary email address
 | 
			
		||||
	timezone    string // User's preferred timezone
 | 
			
		||||
	preferences UserPreferences // User preferences for MCC
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										33
									
								
								specs/models/circle/wallet.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								specs/models/circle/wallet.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
module circle
 | 
			
		||||
 | 
			
		||||
import freeflowuniverse.herolib.hero.models.core
 | 
			
		||||
 | 
			
		||||
// Wallet represents a wallet associated with a circle for financial operations
 | 
			
		||||
pub struct Wallet {
 | 
			
		||||
	core.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	circle_id     u32          // Reference to the circle this wallet belongs to @[index]
 | 
			
		||||
	address       string       // Blockchain address for this wallet @[index]
 | 
			
		||||
	type          WalletType   // Type of wallet (custodial/non-custodial)
 | 
			
		||||
	balance       f64          // Current balance in the wallet
 | 
			
		||||
	currency      string       // Currency type (e.g., "USD", "BTC", "ETH")
 | 
			
		||||
	is_primary    bool         // Whether this is the primary wallet for the circle
 | 
			
		||||
	status        WalletStatus // Current wallet status
 | 
			
		||||
	last_activity u64          // Unix timestamp of last transaction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WalletType defines the types of wallets supported
 | 
			
		||||
pub enum WalletType {
 | 
			
		||||
	custodial
 | 
			
		||||
	non_custodial
 | 
			
		||||
	hardware
 | 
			
		||||
	software
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WalletStatus represents the operational status of a wallet
 | 
			
		||||
pub enum WalletStatus {
 | 
			
		||||
	active
 | 
			
		||||
	inactive
 | 
			
		||||
	frozen
 | 
			
		||||
	archived
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user