These are notes useful only for people interested in understanding the famflows model and maybe modifying the sources.
This is the famflows shema:
The famflows model is rather simple, but, I hope, effective.
This is the database schema, in sqlite3's dialect. In sqlite3, the column "integer primary key" is simply an alias for the ROWID integer (a 64-bit integer which identifies the row).
BEGIN TRANSACTION; CREATE TABLE units ( id integer primary key, short_name text, long_name text); CREATE TABLE materialgroups ( id integer primary key, title text, description text, parent_group integer ); CREATE TABLE actorgroups ( id integer primary key, title text, description text, parent_group integer ); CREATE TABLE materials_types ( id integer, description text ); INSERT INTO "materials_types" VALUES(0,'Estate'); INSERT INTO "materials_types" VALUES(1,'Depreciable'); INSERT INTO "materials_types" VALUES(2,'Consumable'); CREATE TABLE materials ( id integer primary key, unit_id integer, type_id integer, material text, additional_info text, group_id integer, scale integer); CREATE TABLE actors ( id integer primary key, description text, actorgroup_id integer ); CREATE TABLE stocks ( id integer primary key, additional_info text, material_id integer, initial_value integer); CREATE TABLE exchanges ( id integer primary key, actor_id integer, stock_in_id integer, stock_out_id integer, in_quantity integer, out_quantity integer, time_id integer, memo text); CREATE TABLE decantations ( id integer primary key, stock_from integer, stock_to integer, quantity_transferred integer, time_id integer, memo text); COMMIT;
Famflows uses sqlite3 as the backend.
The database schema is very simple, we have only 4 main objects
The Actor
The Material
The Stock
The Folder
Conceptually the data model of famflows is a couple of n-ary trees connected by the exchanges objects.
Stocks of the same material can be connected also by means of decantations.