The first step of a project is to create the database.
You can find an example for PostgreSQL here
and for MySQL here.
The primary key of a Model must be named 'id'.
About a simple Model or abstract Model, it must be a 'SERIAL' for PostgreSQL and an 'INT AUTO_INCREMENT' for MySQL.
About a concrete Model, it must be a simple 'INT' and in addition to being a primary key,
it is a foreign key referencing the primary key of the related abstract Model.
The primary key of an Association is a composite key, composed of the primary keys of the Models involved in the Association.
Each element of the composite key is a foreign key referencing the primary key of the related Model.
Instead of using the 'ENUM' field type, you should use the Enum_model concept (See Enum model).
The main configuration file is
./application/config/config.php.
In addition to the CodeIgniter configuration items, you have to set the item $config['application_namespace'].
This item corresponds to the folder ./application.
It is used in the folder ./application/business for the models and the associations.
It can also be used if you create a folder in ./application, for example a folder 'utils'.
The Artefact configuration file is:
./application/config/config_artefact.php
There are three config items:
In the array $autoload['helper'] of the file ./application/config/autoload.php, you have to add 'pgsql' if your database is PostgreSQL or 'mysql' if it is MySQL.
The Model classes are located in the folder ./application/business/models.
The namespace is 'application_namespace\business\models' where application_namespace is the namespace set in $config['application_namespace'].
A Model class extends the Concorde\artefact\Model class.
If it is an abstract model, it uses the Concorde\artefact\Table_abstract_model_trait trait.
If it is a concrete model, it uses the Concorde\artefact\Table_concrete_model_trait trait.
The properties are 'private' and accessible through the getters/setters.
The names of the basic properties must match the names of the database fields.
The parameters of the constructor must be the basic properties and their names must match each other.
In the constructor, the association properties must be set to 'new Undefined()'.
The Association classes are located in the folder ./application/business/associations.
The namespace is 'application_namespace\business\associations' where application_namespace is the namespace set in $config['application_namespace'].
An Association class extends the Concorde\artefact\Association class and uses the Concorde\artefact\Table_association_trait trait.
The properties are 'private' and accessible through the getters/setters.
The names of the basic properties must match the names of the database fields.
The parameters of the constructor must be the basic properties and their names must match each other.
The name of an associate property must match the related 'reverse_property' item in $config['artefact_mapping_associations'].