2.7 KiB
Governance Module
This directory contains the core data structures used in the Freezone Manager governance module. These models serve as the foundation for corporate governance functionality, providing essential data structures for companies, shareholders, meetings, voting, and more.
Overview
The governance models implement the Serde traits (Serialize/Deserialize) and database traits (Storable, SledModel), which allows them to be stored and retrieved using the generic SledDB implementation. Each model provides:
- A struct definition with appropriate fields
- Serde serialization through derive macros
- Methods for database integration through the SledModel trait
- Utility methods for common operations
Core Models
Company (company.rs
)
The Company model represents a company registered in the Freezone:
- Company: Main struct with fields for company information
- CompanyStatus: Enum for possible company statuses (Active, Inactive, Suspended)
- BusinessType: Enum for possible business types (Coop, Single, Twin, Starter, Global)
Shareholder (shareholder.rs
)
The Shareholder model represents a shareholder of a company:
- Shareholder: Main struct with fields for shareholder information
- ShareholderType: Enum for possible shareholder types (Individual, Corporate)
Meeting (meeting.rs
)
The Meeting model represents a board meeting of a company:
- Meeting: Main struct with fields for meeting information
- Attendee: Represents an attendee of a meeting
- MeetingStatus: Enum for possible meeting statuses (Scheduled, Completed, Cancelled)
- AttendeeRole: Enum for possible attendee roles (Coordinator, Member, Secretary, etc.)
- AttendeeStatus: Enum for possible attendee statuses (Confirmed, Pending, Declined)
User (user.rs
)
The User model represents a user in the Freezone Manager system:
- User: Main struct with fields for user information
Vote (vote.rs
)
The Vote model represents a voting item in the Freezone:
- Vote: Main struct with fields for vote information
- VoteOption: Represents an option in a vote
- Ballot: Represents a ballot cast by a user
- VoteStatus: Enum for possible vote statuses (Open, Closed, Cancelled)
Usage
These models are used by the governance module to manage corporate governance. They are typically accessed through the database handlers that implement the generic SledDB interface.
Future Enhancements
See the GOVERNANCE_ENHANCEMENT_PLAN.md file for details on planned enhancements to the governance module, including:
- New models for committees, resolutions, and compliance
- Enhanced relationships with other modules (biz, mcc, circle)
- Additional utility methods and functionality