Update git remote URL from git.threefold.info to git.ourworld.tf
This commit is contained in:
		@@ -1,68 +1,55 @@
 | 
			
		||||
module contract
 | 
			
		||||
module legal
 | 
			
		||||
 | 
			
		||||
import base
 | 
			
		||||
import freeflowuniverse.herolib.data.ourtime
 | 
			
		||||
import freeflowuniverse.herolib.hero.models.core
 | 
			
		||||
 | 
			
		||||
// Contract represents a legal agreement
 | 
			
		||||
pub struct Contract {
 | 
			
		||||
	base.Base // Base struct for common fields
 | 
			
		||||
pub mut:
 | 
			
		||||
	id                      string // Unique ID for the contract (UUID string)
 | 
			
		||||
	title                   string
 | 
			
		||||
	description             string
 | 
			
		||||
	contract_type           string // service, employment, nda, sla, partnership, distribution, license, membership, other
 | 
			
		||||
	status                  ContractStatus
 | 
			
		||||
	created_at              ourtime.OurTime
 | 
			
		||||
	updated_at              ourtime.OurTime
 | 
			
		||||
	created_by              string          // User ID or name of the creator
 | 
			
		||||
	terms_and_conditions    string          // JSON string or markdown
 | 
			
		||||
	start_date              ourtime.OurTime // Optional
 | 
			
		||||
	end_date                ourtime.OurTime // Optional
 | 
			
		||||
	renewal_period_days     int             // Optional (0 if not applicable)
 | 
			
		||||
	next_renewal_date       ourtime.OurTime // Optional
 | 
			
		||||
	signers                 []ContractSigner
 | 
			
		||||
	revisions               []ContractRevision
 | 
			
		||||
	current_version         u32
 | 
			
		||||
	last_signed_date        ourtime.OurTime // Optional
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ContractRevision represents a version of the contract content
 | 
			
		||||
pub struct ContractRevision {
 | 
			
		||||
	// base.Base // If applicable
 | 
			
		||||
pub mut:
 | 
			
		||||
	version    u32
 | 
			
		||||
	content    string // The actual content of the contract revision
 | 
			
		||||
	created_at ourtime.OurTime
 | 
			
		||||
	created_by string // User ID or name of the creator
 | 
			
		||||
	comments   string // Optional in Rust, string can be empty
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ContractStatus defines the possible statuses of a contract
 | 
			
		||||
// ContractStatus represents the current state of a legal contract
 | 
			
		||||
pub enum ContractStatus {
 | 
			
		||||
	draft
 | 
			
		||||
	pending_signatures
 | 
			
		||||
	signed
 | 
			
		||||
	pending
 | 
			
		||||
	active
 | 
			
		||||
	expired
 | 
			
		||||
	terminated
 | 
			
		||||
	cancelled
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ContractSigner represents a party involved in signing a contract
 | 
			
		||||
pub struct ContractSigner {
 | 
			
		||||
pub mut:
 | 
			
		||||
	id         string // Unique ID for the signer (UUID string)
 | 
			
		||||
	name       string
 | 
			
		||||
	email      string
 | 
			
		||||
	status     SignerStatus
 | 
			
		||||
	signed_at  ourtime.OurTime // Optional in Rust, OurTime can be zero
 | 
			
		||||
	comments   string        // Optional in Rust, string can be empty
 | 
			
		||||
	last_reminder_mail_sent_at ourtime.OurTime // Unix timestamp of last reminder sent
 | 
			
		||||
	signature_data string    // Base64 encoded signature image data (Optional in Rust)
 | 
			
		||||
// ContractType categorizes the type of legal agreement
 | 
			
		||||
pub enum ContractType {
 | 
			
		||||
	service
 | 
			
		||||
	sales
 | 
			
		||||
	lease
 | 
			
		||||
	employment
 | 
			
		||||
	partnership
 | 
			
		||||
	nda
 | 
			
		||||
	other
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SignerStatus defines the status of a contract signer
 | 
			
		||||
pub enum SignerStatus {
 | 
			
		||||
	pending
 | 
			
		||||
	signed
 | 
			
		||||
	rejected
 | 
			
		||||
// Contract represents a legal agreement between parties
 | 
			
		||||
// This model stores essential information about contracts including parties, terms, and status
 | 
			
		||||
pub struct Contract {
 | 
			
		||||
	core.Base
 | 
			
		||||
pub mut:
 | 
			
		||||
	title          string         // Human-readable title of the contract @[index]
 | 
			
		||||
	contract_type  ContractType   // Type/category of the contract
 | 
			
		||||
	status         ContractStatus // Current status of the contract
 | 
			
		||||
	party_a        string         // First party identifier (company, individual, etc.) @[index]
 | 
			
		||||
	party_b        string         // Second party identifier @[index]
 | 
			
		||||
	effective_date u64            // Unix timestamp when contract becomes effective
 | 
			
		||||
 | 
			
		||||
	expiration_date u64 // Unix timestamp when contract expires
 | 
			
		||||
 | 
			
		||||
	total_value f64 // Monetary value of the contract
 | 
			
		||||
 | 
			
		||||
	currency string // Currency code (USD, EUR, etc.)
 | 
			
		||||
 | 
			
		||||
	terms string // Full text of the contract terms
 | 
			
		||||
 | 
			
		||||
	signature_date u64 // Unix timestamp when contract was signed
 | 
			
		||||
 | 
			
		||||
	version string // Version identifier for contract revisions
 | 
			
		||||
 | 
			
		||||
	parent_contract_id ?u32 // Optional reference to parent contract for amendments @[index]
 | 
			
		||||
 | 
			
		||||
	attachment_urls []string // URLs or paths to attached documents
 | 
			
		||||
 | 
			
		||||
	notes string // Additional notes and comments
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user