<commit_before><?php
/**
 * Create DB schema.
 * User: <NAME> <<EMAIL>>
 */
namespace Praxigento\Odoo\Setup;

use Praxigento\Odoo\Repo\Entity\Data\Category;
use Praxigento\Odoo\Repo\Entity\Data\Customer;
use Praxigento\Odoo\Repo\Entity\Data\Lot;
use Praxigento\Odoo\Repo\Entity\Data\Product;
use Praxigento\Odoo\Repo\Entity\Data\Registry\Request;
use Praxigento\Odoo\Repo\Entity\Data\SaleOrder;
use Praxigento\Odoo\Repo\Entity\Data\Warehouse;

class InstallSchema extends \Praxigento\Core\App\Setup\Schema\Base
{
    protected function _setup()
    {
        /** Read and parse JSON schema. */
        $pathToFile = __DIR__ . '/../etc/dem.json';
        $pathToNode = '/dBEAR/package/Praxigento/package/Odoo';
        $demPackage = $this->_toolDem->readDemPackage($pathToFile, $pathToNode);

        /* Registry / Request */
        $entityAlias = Request::ENTITY_NAME;
        $demEntity = $demPackage->get('package/Registry/entity/Request');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Category */
        $entityAlias = Category::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/Category');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Customer */
        $entityAlias = Customer::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/Customer');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Lot */
        $entityAlias = Lot::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/Lot');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Product */
        $entityAlias = Product::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/Product');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* SaleOrder */
        $entityAlias = SaleOrder::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/SaleOrder');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Warehouse */
        $entityAlias = Warehouse::ENTITY_NAME;
        $demEntity = $demPackage->get('entity/Warehouse');
        $this->_toolDem->createEntity($entityAlias, $demEntity);
    }


}<commit_msg>MOBI-1073 Clean up InstallScheme classes in modules<commit_after><?php
/**
 * Create DB schema.
 * User: <NAME> <<EMAIL>>
 */

namespace Praxigento\Odoo\Setup;

use Praxigento\Odoo\Repo\Entity\Data\Category;
use Praxigento\Odoo\Repo\Entity\Data\Customer;
use Praxigento\Odoo\Repo\Entity\Data\Lot;
use Praxigento\Odoo\Repo\Entity\Data\Product;
use Praxigento\Odoo\Repo\Entity\Data\Registry\Request;
use Praxigento\Odoo\Repo\Entity\Data\SaleOrder;
use Praxigento\Odoo\Repo\Entity\Data\Warehouse;

class InstallSchema extends \Praxigento\Core\App\Setup\Schema\Base
{
    protected function setup()
    {
        /** Read and parse JSON schema. */
        $pathToFile = __DIR__ . '/../etc/dem.json';
        $pathToNode = '/dBEAR/package/Praxigento/package/Odoo';
        $demPackage = $this->toolDem->readDemPackage($pathToFile, $pathToNode);

        /* Registry / Request */
        $demEntity = $demPackage->get('package/Registry/entity/Request');
        $this->toolDem->createEntity(Request::ENTITY_NAME, $demEntity);

        /* Category */
        $demEntity = $demPackage->get('entity/Category');
        $this->toolDem->createEntity(Category::ENTITY_NAME, $demEntity);

        /* Customer */
        $demEntity = $demPackage->get('entity/Customer');
        $this->toolDem->createEntity(Customer::ENTITY_NAME, $demEntity);

        /* Lot */
        $demEntity = $demPackage->get('entity/Lot');
        $this->toolDem->createEntity(Lot::ENTITY_NAME, $demEntity);

        /* Product */
        $demEntity = $demPackage->get('entity/Product');
        $this->toolDem->createEntity(Product::ENTITY_NAME, $demEntity);

        /* SaleOrder */
        $demEntity = $demPackage->get('entity/SaleOrder');
        $this->toolDem->createEntity(SaleOrder::ENTITY_NAME, $demEntity);

        /* Warehouse */
        $demEntity = $demPackage->get('entity/Warehouse');
        $this->toolDem->createEntity(Warehouse::ENTITY_NAME, $demEntity);
    }

}
{'fraction_non_alphanumeric': 0.1579330422125182, 'fraction_numerical': 0.0009704027171276079, 'mean_word_length': 3.1943031536113935, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '489739', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1328, 'n_words': 178}