bildvitta / sp-produto
Installs: 6 383
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 13
Forks: 0
Open Issues: 0
Requires
- php: ^8.1|^8.2|^8.3
- bildvitta/iss-sdk: ^0.1
- illuminate/contracts: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- php-amqplib/php-amqplib: ^3.2.0
- ramsey/uuid: ^4.2.2
- spatie/laravel-package-tools: ^1.12
Requires (Dev)
- brianium/paratest: ^6.6
- laravel/pint: ^1.14
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.6
- phpunit/phpunit: ^9.5
- dev-main
- v0.1.27-beta.01
- v0.1.26
- v0.1.26-beta.01
- v0.1.25
- v0.1.24
- v0.1.23
- v0.1.23-beta.02
- v0.1.23-beta.01
- v0.1.22
- v0.1.21
- v0.1.21-beta.01
- v0.1.20
- v0.1.19
- v0.1.18
- v0.1.18-beta.01
- v0.1.17
- v0.1.16-beta.02
- v0.1.16-beta.01
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1
- v0.1-beta.1
- v0.0.27
- v0.0.26
- v0.0.25
- v0.0.24
- v0.0.23
- v0.0.22
- v0.0.21
- v0.0.20
- v0.0.19
- v0.0.18
- v0.0.17
- v0.0.16
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-develop
- dev-feature/vmd
- dev-feature/unit-price
- dev-feature/price-table
- dev-feature/documents
- dev-feature/insert-has-table-period
- dev-feature/proposal-model-periodicities
- dev-hotfix/appaisal-value
- dev-feature/properties
- dev-feature/laravel-pint
- dev-feature/parameter-verges
- dev-feature/next
- dev-feature/unit-table-price
- dev-feature/sellable-by-scope-fix
- dev-feature/sellable-by
- dev-feature/sellable-by-adjustments
- dev-feature/real-estate-development-accessory-category-fix
- dev-feature/fix-model-imports
- dev-feature/add-pivot-tables-foreign-keys
- dev-feature/real_estate_development_characteristic_fix
- dev-feature/sp-produto-database-seeders
- dev-feature/fix-import-command
- dev-feature/update-models
- dev-feature/create-parameters-table
- dev-feature/worker_messages
This package is not auto-updated.
Last update: 2024-12-11 19:09:22 UTC
README
Introduction
The SP (Space Probe) package is responsible for collecting remote data updates for the module, keeping the data structure similar as possible, through the message broker.
Installation
You can install the package via composer:
composer require bildvitta/sp-produto
For everything to work perfectly in addition to having the settings file published in your application, run the command below:
php artisan sp-produto:config
Configuration
This is the contents of the published config file:
use BildVitta\Hub\Entities\HubCompany; return [ 'table_prefix' => env('MS_SP_PRODUTO_TABLE_PREFIX', 'produto_'), 'model_company' => env('MS_SP_PRODUTO_COMPANY', HubCompany::class), 'db' => [ 'host' => env('PRODUTO_DB_HOST'), 'port' => env('PRODUTO_DB_PORT'), 'database' => env('PRODUTO_DB_DATABASE'), 'username' => env('PRODUTO_DB_USERNAME'), 'password' => env('PRODUTO_DB_PASSWORD'), ], 'rabbitmq' => [ 'host' => env('RABBITMQ_HOST'), 'port' => env('RABBITMQ_PORT'), 'user' => env('RABBITMQ_USER'), 'password' => env('RABBITMQ_PASSWORD'), 'virtualhost' => env('RABBITMQ_VIRTUALHOST', '/'), 'exchange' => [ 'real_estate_developments' => env('RABBITMQ_EXCHANGE_REAL_ESTATE_DEVELOPMENTS', 'real_estate_developments'), ], 'queue' => [ 'real_estate_developments' => env('RABBITMQ_QUEUE_REAL_ESTATE_DEVELOPMENTS'), ] ], 'sync_relations' => [ 'buying_options', 'parameters', // need buying_options 'insurances', 'accessories', 'mirrors', // need parameters 'blueprints', // need typologies, accessories 'characteristics', 'proposal_models', 'stages', 'typologies', // need proposal_models 'units', // need typologies, blueprints, mirrors 'documents', 'media', 'properties', ], ];
Remove the relationships that you do not want to use, in order not to create the related tables, in the configuration file.
Some relationships require other relationships, indicated in the comments.
Run the command to install migrations and run seeds.
php artisan sp-produto:install
If you want to add some relationship later, add it to the settings array and run the above command again.
Importing data
You can import initial data from the parent module by setting the database connection data in the configuration file. However, it will be necessary to import the data from the dependent module first: sp-hub.
php artisan dataimport:produto_real_estate_developments
Database seeder
You can seed your database with fake data to work with. However, it will be necessary to seed the other dependency first: sp-hub.
php artisan db:seed --class=SpProdutoSeeder
Running the worker
After setting the message broker access data in the configuration file, you can run the worker to keep the data up to date.
php artisan rabbitmqworker:real_estate_developments