db/specs/modelsold/biz/shareholder.v

28 lines
950 B
V

module biz
import base
import freeflowuniverse.herolib.data.ourtime
// ShareholderType represents the type of shareholder
pub enum ShareholderType {
individual
corporate
}
// Shareholder represents a shareholder of a company
pub struct Shareholder {
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
// id u32 is provided by base.Base
company_id u32 // Reference to Company.id
user_id u32 // Reference to User.id (if individual) or another entity ID (if corporate)
name string // Denormalized name of the shareholder (user or corporate entity)
shares f64 // Number of shares held
percentage f64 // Percentage of ownership
type_ ShareholderType
since ourtime.OurTime // Date since becoming a shareholder
// created_at is provided by base.Base.creation_time
// updated_at is provided by base.Base.mod_time
}