Skip to content

biz.bizmodel #

fn get #

fn get(name string) !&BizModel

fn getset #

fn getset(name string) !&BizModel

get bizmodel from global

fn play #

fn play(mut plbook PlayBook) !

fn playmacro #

fn playmacro(action playbook.Action) !string

fn row_args_from_params #

fn row_args_from_params(p Params) !RowGetArgs

fetches args for getting row from params

fn set #

fn set(bizmodel BizModel)

enum ExportFormat #

enum ExportFormat {
	docusaurus
	mdbook
}

enum ReportSection #

enum ReportSection {
	revenue_model
	cost_structure
	human_resources
}

struct BizModel #

struct BizModel {
pub mut:
	name        string
	description string
	workdir     string ='${os.home_dir()}/hero/var/bizmodel'
	sheet       &spreadsheet.Sheet
	employees   map[string]&Employee
	departments map[string]&Department
	costcenters map[string]&Costcenter
	products    map[string]&Product
}

fn (BizModel) act #

fn (mut m BizModel) act(action Action) !Action

fn (BizModel) export_graph_pie_action #

fn (mut m BizModel) export_graph_pie_action(action Action) !Action

fn (BizModel) export_overview_action #

fn (mut m BizModel) export_overview_action(action Action) !Action

fn (BizModel) new_report #

fn (b BizModel) new_report(report Report) !Report

fn (BizModel) play #

fn (mut m BizModel) play(mut plbook PlayBook) !

fn (BizModel) write_cost_structure #

fn (model BizModel) write_cost_structure(path string) !

fn (BizModel) write_introduction #

fn (model BizModel) write_introduction(path string) !

fn (BizModel) write_operational_plan #

fn (model BizModel) write_operational_plan(path string) !

fn (BizModel) write_revenue_model #

fn (model BizModel) write_revenue_model(path string) !

struct Costcenter #

struct Costcenter {
pub:
	name        string
	description string
	department  string
}

struct Department #

struct Department {
pub:
	name        string
	description string
	page        string
	title       string
	order       int
}

struct Employee #

struct Employee {
pub:
	name                 string
	description          string
	title                string
	department           string
	cost                 string
	cost_percent_revenue f64
	nrpeople             string
	indexation           f64
	cost_center          string
	page                 string
	fulltime_perc        f64
}

struct Export #

struct Export {
pub:
	path      string
	overwrite bool
	format    ExportFormat
}

struct Product #

struct Product {
pub mut:
	name                string
	title               string
	description         string
	order               int
	has_revenue         bool
	has_items           bool
	has_oneoffs         bool
	nr_months_recurring int
}

struct Report #

struct Report {
pub:
	name        string
	title       string
	description string
	path        string
	sections    []ReportSection
}

fn (Report) export #

fn (r Report) export(export Export) !