Update git remote URL from git.threefold.info to git.ourworld.tf
This commit is contained in:
		
							
								
								
									
										68
									
								
								specs/modelsold/legal/contract.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								specs/modelsold/legal/contract.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
			
		||||
module contract
 | 
			
		||||
 | 
			
		||||
import base
 | 
			
		||||
import freeflowuniverse.herolib.data.ourtime
 | 
			
		||||
 | 
			
		||||
// 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
 | 
			
		||||
pub enum ContractStatus {
 | 
			
		||||
	draft
 | 
			
		||||
	pending_signatures
 | 
			
		||||
	signed
 | 
			
		||||
	active
 | 
			
		||||
	expired
 | 
			
		||||
	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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SignerStatus defines the status of a contract signer
 | 
			
		||||
pub enum SignerStatus {
 | 
			
		||||
	pending
 | 
			
		||||
	signed
 | 
			
		||||
	rejected
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user