diff --git a/composer.json b/composer.json index 50663ca..5d59d39 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "lexik/jwt-authentication-bundle": "^2.19", "nelmio/cors-bundle": "^2.3", "oilstone/php-rsql-parser": "^1.0", + "oneup/flysystem-bundle": "^4.9", "oro/doctrine-extensions": "^2.0", "overblog/graphql-bundle": "^1.0", "phpdocumentor/reflection-docblock": "^5.3", @@ -55,6 +56,7 @@ "willdurand/geocoder-bundle": "^5.0" }, "require-dev": { + "doctrine/doctrine-fixtures-bundle": "^3.4", "phpunit/phpunit": "^9.5", "symfony/browser-kit": "6.3.*", "symfony/css-selector": "6.3.*", diff --git a/composer.lock b/composer.lock index 706c975..bced3cc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "64bc7dcb94eedc712793012c7b93273a", + "content-hash": "e25a38821f5e09379501a5cdb0bdee87", "packages": [ { "name": "brick/geo", @@ -2522,6 +2522,96 @@ }, "time": "2022-05-18T11:44:56+00:00" }, + { + "name": "oneup/flysystem-bundle", + "version": "4.9.0", + "source": { + "type": "git", + "url": "https://github.com/1up-lab/OneupFlysystemBundle.git", + "reference": "9e317a1345533eb45a61fa68ec9933dd4a3436c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/1up-lab/OneupFlysystemBundle/zipball/9e317a1345533eb45a61fa68ec9933dd4a3436c5", + "reference": "9e317a1345533eb45a61fa68ec9933dd4a3436c5", + "shasum": "" + }, + "require": { + "league/flysystem": "^2.0 || ^3.0", + "php": "^8.0", + "symfony/config": "^4.4 || ^5.3 || ^6.0", + "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0" + }, + "require-dev": { + "ext-simplexml": "*", + "friendsofphp/php-cs-fixer": "^2.16 || ^3.5", + "league/flysystem-async-aws-s3": "^2.0 || ^3.0", + "league/flysystem-aws-s3-v3": "^2.0 || ^3.0", + "league/flysystem-azure-blob-storage": "^3.0", + "league/flysystem-ftp": "^2.0 || ^3.0", + "league/flysystem-google-cloud-storage": "^2.0 || ^3.0", + "league/flysystem-memory": "^2.0 || ^3.0", + "league/flysystem-sftp-v3": "^2.0 || ^3.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9.5", + "royvoetman/flysystem-gitlab-storage": "^2.0 || ^3.0", + "symfony/asset": "^4.4 || ^5.3 || ^6.0", + "symfony/browser-kit": "^4.4 || ^5.3 || ^6.0", + "symfony/finder": "^4.4 || ^5.3 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0", + "symfony/phpunit-bridge": "^6.0", + "symfony/templating": "^4.4 || ^5.3 || ^6.0", + "symfony/translation": "^4.4 || ^5.3 || ^6.0", + "symfony/yaml": "^4.4 || ^5.3 || ^6.0" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Required for FTP and SFTP", + "league/flysystem-async-aws-s3": "Use flysystem S3 adapter from AsyncAws", + "league/flysystem-aws-s3-v3": "Use S3 storage with AWS SDK v3", + "league/flysystem-google-cloud-storage": "Use Google Cloud Storage Adapter for Flysystem", + "league/flysystem-sftp-v3": "Allows SFTP server storage via phpseclib", + "royvoetman/flysystem-gitlab-storage": "Use Gitlab Storage filesystem for Flysystem" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Oneup\\FlysystemBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Schmid", + "email": "js@1up.io", + "homepage": "https://1up.io", + "role": "Developer" + }, + { + "name": "David Greminger", + "email": "dg@1up.io", + "homepage": "https://1up.io", + "role": "Developer" + } + ], + "description": "Integrates Flysystem filesystem abstraction library to your Symfony project.", + "homepage": "https://1up.io", + "keywords": [ + "Flysystem", + "abstraction", + "filesystem", + "symfony" + ], + "support": { + "issues": "https://github.com/1up-lab/OneupFlysystemBundle/issues", + "source": "https://github.com/1up-lab/OneupFlysystemBundle/tree/4.9.0" + }, + "time": "2023-08-08T07:51:09+00:00" + }, { "name": "oro/doctrine-extensions", "version": "2.0.2", @@ -9279,6 +9369,171 @@ } ], "packages-dev": [ + { + "name": "doctrine/data-fixtures", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/data-fixtures.git", + "reference": "ae4e845decbe177348fdbecd04331f4fb96aa301" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/ae4e845decbe177348fdbecd04331f4fb96aa301", + "reference": "ae4e845decbe177348fdbecd04331f4fb96aa301", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^0.5.3 || ^1.0", + "doctrine/persistence": "^1.3.3 || ^2.0 || ^3.0", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<2.13", + "doctrine/orm": "<2.14", + "doctrine/phpcr-odm": "<1.3.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "doctrine/dbal": "^2.13 || ^3.0", + "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0", + "doctrine/orm": "^2.14", + "ext-sqlite3": "*", + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^8.5 || ^9.5 || ^10.0", + "symfony/cache": "^5.0 || ^6.0", + "vimeo/psalm": "^4.10 || ^5.9" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)", + "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures", + "doctrine/orm": "For loading ORM fixtures", + "doctrine/phpcr-odm": "For loading PHPCR ODM fixtures" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\DataFixtures\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Data Fixtures for all Doctrine Object Managers", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "database" + ], + "support": { + "issues": "https://github.com/doctrine/data-fixtures/issues", + "source": "https://github.com/doctrine/data-fixtures/tree/1.6.7" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdata-fixtures", + "type": "tidelift" + } + ], + "time": "2023-08-17T21:15:33+00:00" + }, + { + "name": "doctrine/doctrine-fixtures-bundle", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineFixturesBundle.git", + "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", + "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", + "shasum": "" + }, + "require": { + "doctrine/data-fixtures": "^1.3", + "doctrine/doctrine-bundle": "^1.11|^2.0", + "doctrine/orm": "^2.6.0", + "doctrine/persistence": "^1.3.7|^2.0|^3.0", + "php": "^7.1 || ^8.0", + "symfony/config": "^3.4|^4.3|^5.0|^6.0", + "symfony/console": "^3.4|^4.3|^5.0|^6.0", + "symfony/dependency-injection": "^3.4.47|^4.3|^5.0|^6.0", + "symfony/doctrine-bridge": "^3.4|^4.1|^5.0|^6.0", + "symfony/http-kernel": "^3.4|^4.3|^5.0|^6.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "^1.4.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "symfony/phpunit-bridge": "^6.0.8", + "vimeo/psalm": "^4.22" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\FixturesBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DoctrineFixturesBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "Fixture", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues", + "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.4" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-fixtures-bundle", + "type": "tidelift" + } + ], + "time": "2023-05-02T15:12:16+00:00" + }, { "name": "masterminds/html5", "version": "2.8.1", diff --git a/config/bundles.php b/config/bundles.php index f351f0c..c2a6809 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -18,4 +18,6 @@ Bazinga\GeocoderBundle\BazingaGeocoderBundle::class => ['all' => true], League\FlysystemBundle\FlysystemBundle::class => ['all' => true], Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true], + Oneup\FlysystemBundle\OneupFlysystemBundle::class => ['all' => true], + Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], ]; diff --git a/config/graphql/types/Scalar.yaml b/config/graphql/types/Scalar.yaml index 35339b8..70dbf27 100644 --- a/config/graphql/types/Scalar.yaml +++ b/config/graphql/types/Scalar.yaml @@ -10,3 +10,8 @@ UploadFile: type: custom-scalar config: scalarType: '@=newObject("Overblog\\GraphQLBundle\\Upload\\Type\\GraphQLUploadType")' + +FileURI: + type: custom-scalar + config: + scalarType: '@=service("App\\GraphQL\\Type\\Scalar\\FileType")' \ No newline at end of file diff --git a/config/packages/oneup_flysystem.yaml b/config/packages/oneup_flysystem.yaml new file mode 100644 index 0000000..92cc2c2 --- /dev/null +++ b/config/packages/oneup_flysystem.yaml @@ -0,0 +1,12 @@ +# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle +oneup_flysystem: + adapters: + default_adapter: + local: + # location: "%kernel.cache_dir%/flysystem" + location: '%kernel.project_dir%/var/storage/default' + filesystems: + default_filesystem: + mount: local + adapter: default_adapter + alias: League\Flysystem\Filesystem diff --git a/config/services.yaml b/config/services.yaml index 522a654..7c2f5d8 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -38,6 +38,6 @@ services: '@App\Service\Geometery\GeometryEngineProvider', "getGeometryEngine", ] - + League\Flysystem\MountManager: '@oneup_flysystem.mount_manager' # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones diff --git a/migrations/.gitignore b/migrations/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/migrations/Version20230918080220.php b/migrations/Version20230918080220.php deleted file mode 100644 index 410d5ff..0000000 --- a/migrations/Version20230918080220.php +++ /dev/null @@ -1,107 +0,0 @@ -addSql('CREATE TABLE address (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', coordinate_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', first_name VARCHAR(64) DEFAULT NULL, last_name VARCHAR(64) DEFAULT NULL, phone_number VARCHAR(32) DEFAULT NULL, email_address VARCHAR(64) DEFAULT NULL, company VARCHAR(64) DEFAULT NULL, country_code VARCHAR(3) NOT NULL, province_code VARCHAR(16) DEFAULT NULL, province_name VARCHAR(64) DEFAULT NULL, city VARCHAR(64) DEFAULT NULL, street VARCHAR(128) DEFAULT NULL, postcode VARCHAR(8) DEFAULT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', google_id VARCHAR(255) DEFAULT NULL, formatted VARCHAR(255) DEFAULT NULL, arrive_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', dtype VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_D4E6F8198BBE953 (coordinate_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE address_coordinates (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', latitude DOUBLE PRECISION NOT NULL, longitude DOUBLE PRECISION NOT NULL, altitude DOUBLE PRECISION DEFAULT NULL, accuracy DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE driver (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', user_account_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', verified TINYINT(1) DEFAULT 1 NOT NULL, UNIQUE INDEX UNIQ_11667CD93C0C9956 (user_account_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE product (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', price_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', dimension_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', title VARCHAR(64) NOT NULL, description VARCHAR(255) DEFAULT NULL, weight INT DEFAULT 0 NOT NULL, dtype VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_D34A04ADD614C7E7 (price_id), UNIQUE INDEX UNIQ_D34A04AD277428AD (dimension_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE product_category (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', code VARCHAR(32) NOT NULL, name VARCHAR(64) NOT NULL, short_name VARCHAR(16) DEFAULT NULL, icon_image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE product_dimension (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', length INT NOT NULL, width INT NOT NULL, height INT NOT NULL, unit VARCHAR(16) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE product_price (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', currency VARCHAR(3) NOT NULL, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE route (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', code VARCHAR(64) NOT NULL, name VARCHAR(128) DEFAULT NULL, start_point POINT DEFAULT NULL COMMENT \'(DC2Type:Point)\', end_point POINT DEFAULT NULL COMMENT \'(DC2Type:Point)\', start_place_id VARCHAR(255) DEFAULT NULL, end_place_id VARCHAR(255) DEFAULT NULL, polyline LINESTRING NOT NULL COMMENT \'(DC2Type:LineString)\', distance INT DEFAULT NULL, duration INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE route_segment (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', owner_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', billing_address_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', origin_address_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', destination_address_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', budget_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', route_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', type VARCHAR(64) NOT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', status VARCHAR(64) DEFAULT \'PENDING\' NOT NULL, pickup_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivery_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', code VARCHAR(32) NOT NULL, INDEX IDX_2CB20DC7E3C61F9 (owner_id), INDEX IDX_2CB20DC79D0C0E4 (billing_address_id), INDEX IDX_2CB20DC4C6CF538 (origin_address_id), INDEX IDX_2CB20DCA88E34C7 (destination_address_id), UNIQUE INDEX UNIQ_2CB20DC36ABA6B8 (budget_id), INDEX IDX_2CB20DC34ECB4E6 (route_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_budget (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', currency VARCHAR(3) NOT NULL, dtype VARCHAR(255) NOT NULL, price INT DEFAULT NULL, min_price INT DEFAULT NULL, max_price INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_driver_bid (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', price INT NOT NULL, currency_code VARCHAR(3) NOT NULL, title VARCHAR(64) DEFAULT NULL, description VARCHAR(1000) DEFAULT NULL, status VARCHAR(64) NOT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_9DD32C17BE036FC (shipment_id), INDEX IDX_9DD32C1C3423909 (driver_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_item (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', product_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', quantity INT NOT NULL, description VARCHAR(255) DEFAULT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1C573407BE036FC (shipment_id), INDEX IDX_1C573404584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE `user` (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, first_name VARCHAR(64) NOT NULL, last_name VARCHAR(64) NOT NULL, phone VARCHAR(64) DEFAULT NULL, is_verified TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_address (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', owner_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', INDEX IDX_5543718B7E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_product (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', owner_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', INDEX IDX_8B471AA77E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE vehicle (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', type_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', status VARCHAR(32) NOT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1B80E486C54C8C93 (type_id), INDEX IDX_1B80E486C3423909 (driver_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE vehicle_type (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', code VARCHAR(32) NOT NULL, short_name VARCHAR(12) NOT NULL, name VARCHAR(64) NOT NULL, icon_image VARCHAR(255) DEFAULT NULL, primary_image VARCHAR(255) DEFAULT NULL, cover_image VARCHAR(255) DEFAULT NULL, client_note VARCHAR(255) DEFAULT NULL, driver_note VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE address ADD CONSTRAINT FK_D4E6F8198BBE953 FOREIGN KEY (coordinate_id) REFERENCES address_coordinates (id)'); - $this->addSql('ALTER TABLE driver ADD CONSTRAINT FK_11667CD93C0C9956 FOREIGN KEY (user_account_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADD614C7E7 FOREIGN KEY (price_id) REFERENCES product_price (id)'); - $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD277428AD FOREIGN KEY (dimension_id) REFERENCES product_dimension (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DC7E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DC79D0C0E4 FOREIGN KEY (billing_address_id) REFERENCES user_address (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DC4C6CF538 FOREIGN KEY (origin_address_id) REFERENCES user_address (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DCA88E34C7 FOREIGN KEY (destination_address_id) REFERENCES user_address (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DC36ABA6B8 FOREIGN KEY (budget_id) REFERENCES shipment_budget (id)'); - $this->addSql('ALTER TABLE shipment ADD CONSTRAINT FK_2CB20DC34ECB4E6 FOREIGN KEY (route_id) REFERENCES route (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C17BE036FC FOREIGN KEY (shipment_id) REFERENCES shipment (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1C3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - $this->addSql('ALTER TABLE shipment_item ADD CONSTRAINT FK_1C573407BE036FC FOREIGN KEY (shipment_id) REFERENCES shipment (id)'); - $this->addSql('ALTER TABLE shipment_item ADD CONSTRAINT FK_1C573404584665A FOREIGN KEY (product_id) REFERENCES user_product (id)'); - $this->addSql('ALTER TABLE user_address ADD CONSTRAINT FK_5543718B7E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE user_address ADD CONSTRAINT FK_5543718BBF396750 FOREIGN KEY (id) REFERENCES address (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE user_product ADD CONSTRAINT FK_8B471AA77E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE user_product ADD CONSTRAINT FK_8B471AA7BF396750 FOREIGN KEY (id) REFERENCES product (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486C54C8C93 FOREIGN KEY (type_id) REFERENCES vehicle_type (id)'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486C3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE address DROP FOREIGN KEY FK_D4E6F8198BBE953'); - $this->addSql('ALTER TABLE driver DROP FOREIGN KEY FK_11667CD93C0C9956'); - $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADD614C7E7'); - $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD277428AD'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DC7E3C61F9'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DC79D0C0E4'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DC4C6CF538'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DCA88E34C7'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DC36ABA6B8'); - $this->addSql('ALTER TABLE shipment DROP FOREIGN KEY FK_2CB20DC34ECB4E6'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C17BE036FC'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1C3423909'); - $this->addSql('ALTER TABLE shipment_item DROP FOREIGN KEY FK_1C573407BE036FC'); - $this->addSql('ALTER TABLE shipment_item DROP FOREIGN KEY FK_1C573404584665A'); - $this->addSql('ALTER TABLE user_address DROP FOREIGN KEY FK_5543718B7E3C61F9'); - $this->addSql('ALTER TABLE user_address DROP FOREIGN KEY FK_5543718BBF396750'); - $this->addSql('ALTER TABLE user_product DROP FOREIGN KEY FK_8B471AA77E3C61F9'); - $this->addSql('ALTER TABLE user_product DROP FOREIGN KEY FK_8B471AA7BF396750'); - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486C54C8C93'); - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486C3423909'); - $this->addSql('DROP TABLE address'); - $this->addSql('DROP TABLE address_coordinates'); - $this->addSql('DROP TABLE driver'); - $this->addSql('DROP TABLE product'); - $this->addSql('DROP TABLE product_category'); - $this->addSql('DROP TABLE product_dimension'); - $this->addSql('DROP TABLE product_price'); - $this->addSql('DROP TABLE route'); - $this->addSql('DROP TABLE route_segment'); - $this->addSql('DROP TABLE shipment'); - $this->addSql('DROP TABLE shipment_budget'); - $this->addSql('DROP TABLE shipment_driver_bid'); - $this->addSql('DROP TABLE shipment_item'); - $this->addSql('DROP TABLE `user`'); - $this->addSql('DROP TABLE user_address'); - $this->addSql('DROP TABLE user_product'); - $this->addSql('DROP TABLE vehicle'); - $this->addSql('DROP TABLE vehicle_type'); - $this->addSql('DROP TABLE messenger_messages'); - } -} diff --git a/migrations/Version20230918152734.php b/migrations/Version20230918152734.php deleted file mode 100644 index 3ee2522..0000000 --- a/migrations/Version20230918152734.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('ALTER TABLE product ADD category_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\''); - $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD12469DE2 FOREIGN KEY (category_id) REFERENCES product_category (id)'); - $this->addSql('CREATE INDEX IDX_D34A04AD12469DE2 ON product (category_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD12469DE2'); - $this->addSql('DROP INDEX IDX_D34A04AD12469DE2 ON product'); - $this->addSql('ALTER TABLE product DROP category_id'); - } -} diff --git a/migrations/Version20230923103601.php b/migrations/Version20230923103601.php deleted file mode 100644 index 823e5f4..0000000 --- a/migrations/Version20230923103601.php +++ /dev/null @@ -1,41 +0,0 @@ -addSql('CREATE TABLE driver_license (id INT AUTO_INCREMENT NOT NULL, license_number VARCHAR(32) NOT NULL, issuance_state VARCHAR(32) DEFAULT NULL, class VARCHAR(32) DEFAULT NULL, expires_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE driver ADD status VARCHAR(32) NOT NULL'); - $this->addSql('ALTER TABLE user ADD address_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\''); - $this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F5B7AF75 ON user (address_id)'); - $this->addSql('ALTER TABLE vehicle ADD vin VARCHAR(32) NOT NULL, ADD license_plate_number VARCHAR(16) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP TABLE driver_license'); - $this->addSql('ALTER TABLE driver DROP status'); - $this->addSql('ALTER TABLE `user` DROP FOREIGN KEY FK_8D93D649F5B7AF75'); - $this->addSql('DROP INDEX UNIQ_8D93D649F5B7AF75 ON `user`'); - $this->addSql('ALTER TABLE `user` DROP address_id'); - $this->addSql('ALTER TABLE vehicle DROP vin, DROP license_plate_number'); - } -} diff --git a/migrations/Version20230923161848.php b/migrations/Version20230923161848.php deleted file mode 100644 index 8cbc84b..0000000 --- a/migrations/Version20230923161848.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE user ADD updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE `user` DROP updated_at, DROP created_at'); - } -} diff --git a/migrations/Version20230923162124.php b/migrations/Version20230923162124.php deleted file mode 100644 index cdd49ba..0000000 --- a/migrations/Version20230923162124.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE user CHANGE created_at created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE `user` CHANGE created_at created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } -} diff --git a/migrations/Version20230923164033.php b/migrations/Version20230923164033.php deleted file mode 100644 index 1242546..0000000 --- a/migrations/Version20230923164033.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE driver ADD updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE driver DROP updated_at, DROP created_at'); - } -} diff --git a/migrations/Version20230923164122.php b/migrations/Version20230923164122.php deleted file mode 100644 index cd35d83..0000000 --- a/migrations/Version20230923164122.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE driver CHANGE created_at created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE driver CHANGE created_at created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } -} diff --git a/migrations/Version20230923224931.php b/migrations/Version20230923224931.php deleted file mode 100644 index 8b8f16d..0000000 --- a/migrations/Version20230923224931.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE vehicle_type ADD note VARCHAR(255) DEFAULT NULL, ADD updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE vehicle_type DROP note, DROP updated_at, DROP created_at'); - } -} diff --git a/migrations/Version20230924142523.php b/migrations/Version20230924142523.php deleted file mode 100644 index 9465a45..0000000 --- a/migrations/Version20230924142523.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE shipment ADD total_weight INT DEFAULT 0 NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment DROP total_weight'); - } -} diff --git a/migrations/Version20230924145527.php b/migrations/Version20230924145527.php deleted file mode 100644 index 6678a0a..0000000 --- a/migrations/Version20230924145527.php +++ /dev/null @@ -1,37 +0,0 @@ -addSql('CREATE TABLE vehicle_dimension (id VARCHAR(255) NOT NULL, length INT NOT NULL, width INT NOT NULL, height INT NOT NULL, unit VARCHAR(32) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE vehicle ADD dimension_id VARCHAR(255) DEFAULT NULL, ADD max_weight_capacity INT DEFAULT NULL, ADD note VARCHAR(255) DEFAULT NULL, ADD description LONGTEXT DEFAULT NULL'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486277428AD FOREIGN KEY (dimension_id) REFERENCES vehicle_dimension (id)'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_1B80E486277428AD ON vehicle (dimension_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486277428AD'); - $this->addSql('DROP TABLE vehicle_dimension'); - $this->addSql('DROP INDEX UNIQ_1B80E486277428AD ON vehicle'); - $this->addSql('ALTER TABLE vehicle DROP dimension_id, DROP max_weight_capacity, DROP note, DROP description'); - } -} diff --git a/migrations/Version20230924163712.php b/migrations/Version20230924163712.php deleted file mode 100644 index 4f896ae..0000000 --- a/migrations/Version20230924163712.php +++ /dev/null @@ -1,39 +0,0 @@ -addSql('CREATE TABLE vehicle (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', type_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', dimension_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', status VARCHAR(32) NOT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', vin VARCHAR(32) NOT NULL, license_plate_number VARCHAR(16) NOT NULL, max_weight_capacity INT DEFAULT NULL, note VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, INDEX IDX_1B80E486C54C8C93 (type_id), INDEX IDX_1B80E486C3423909 (driver_id), UNIQUE INDEX UNIQ_1B80E486277428AD (dimension_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE vehicle_dimension (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', length INT NOT NULL, width INT NOT NULL, height INT NOT NULL, unit VARCHAR(32) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486C54C8C93 FOREIGN KEY (type_id) REFERENCES vehicle_type (id)'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486C3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - $this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E486277428AD FOREIGN KEY (dimension_id) REFERENCES vehicle_dimension (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486C54C8C93'); - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486C3423909'); - $this->addSql('ALTER TABLE vehicle DROP FOREIGN KEY FK_1B80E486277428AD'); - $this->addSql('DROP TABLE vehicle'); - $this->addSql('DROP TABLE vehicle_dimension'); - } -} diff --git a/migrations/Version20230925084058.php b/migrations/Version20230925084058.php deleted file mode 100644 index cc69e26..0000000 --- a/migrations/Version20230925084058.php +++ /dev/null @@ -1,41 +0,0 @@ -addSql('CREATE TABLE shipment_driver_bid_price (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', currency_code VARCHAR(3) NOT NULL, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD vehicle_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', ADD price_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', ADD pickup_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD delivery_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP price, DROP currency_code'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1545317D1 FOREIGN KEY (vehicle_id) REFERENCES vehicle (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1D614C7E7 FOREIGN KEY (price_id) REFERENCES shipment_budget (id)'); - $this->addSql('CREATE INDEX IDX_9DD32C1545317D1 ON shipment_driver_bid (vehicle_id)'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_9DD32C1D614C7E7 ON shipment_driver_bid (price_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP TABLE shipment_driver_bid_price'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1545317D1'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1D614C7E7'); - $this->addSql('DROP INDEX IDX_9DD32C1545317D1 ON shipment_driver_bid'); - $this->addSql('DROP INDEX UNIQ_9DD32C1D614C7E7 ON shipment_driver_bid'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD price INT NOT NULL, ADD currency_code VARCHAR(3) NOT NULL, DROP vehicle_id, DROP price_id, DROP pickup_at, DROP delivery_at'); - } -} diff --git a/migrations/Version20230925091626.php b/migrations/Version20230925091626.php deleted file mode 100644 index 3b91557..0000000 --- a/migrations/Version20230925091626.php +++ /dev/null @@ -1,41 +0,0 @@ -addSql('CREATE TABLE shipment_driver_bid (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', vehicle_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', price_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', title VARCHAR(64) DEFAULT NULL, description VARCHAR(1000) DEFAULT NULL, status VARCHAR(64) NOT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', pickup_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivery_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_9DD32C17BE036FC (shipment_id), INDEX IDX_9DD32C1C3423909 (driver_id), INDEX IDX_9DD32C1545317D1 (vehicle_id), UNIQUE INDEX UNIQ_9DD32C1D614C7E7 (price_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_driver_bid_price (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', currency VARCHAR(3) NOT NULL, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C17BE036FC FOREIGN KEY (shipment_id) REFERENCES shipment (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1C3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1545317D1 FOREIGN KEY (vehicle_id) REFERENCES vehicle (id)'); - $this->addSql('ALTER TABLE shipment_driver_bid ADD CONSTRAINT FK_9DD32C1D614C7E7 FOREIGN KEY (price_id) REFERENCES shipment_driver_bid_price (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C17BE036FC'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1C3423909'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1545317D1'); - $this->addSql('ALTER TABLE shipment_driver_bid DROP FOREIGN KEY FK_9DD32C1D614C7E7'); - $this->addSql('DROP TABLE shipment_driver_bid'); - $this->addSql('DROP TABLE shipment_driver_bid_price'); - } -} diff --git a/migrations/Version20230926125458.php b/migrations/Version20230926125458.php deleted file mode 100644 index d40bf6a..0000000 --- a/migrations/Version20230926125458.php +++ /dev/null @@ -1,49 +0,0 @@ -addSql('CREATE TABLE shipment_execution (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', vehicle_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', starting_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', label VARCHAR(64) DEFAULT NULL, description LONGTEXT DEFAULT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_38B3D10BC3423909 (driver_id), INDEX IDX_38B3D10B545317D1 (vehicle_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_order (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', driver_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipper_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', bid_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', vehicle_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', execution_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', status VARCHAR(32) NOT NULL, pickup_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivery_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_79E4313DC3423909 (driver_id), INDEX IDX_79E4313D38459F23 (shipper_id), UNIQUE INDEX UNIQ_79E4313D7BE036FC (shipment_id), UNIQUE INDEX UNIQ_79E4313D4D9866B8 (bid_id), INDEX IDX_79E4313D545317D1 (vehicle_id), INDEX IDX_79E4313D57125544 (execution_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_execution ADD CONSTRAINT FK_38B3D10BC3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - $this->addSql('ALTER TABLE shipment_execution ADD CONSTRAINT FK_38B3D10B545317D1 FOREIGN KEY (vehicle_id) REFERENCES vehicle (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313DC3423909 FOREIGN KEY (driver_id) REFERENCES driver (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D38459F23 FOREIGN KEY (shipper_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D7BE036FC FOREIGN KEY (shipment_id) REFERENCES shipment (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D4D9866B8 FOREIGN KEY (bid_id) REFERENCES shipment_driver_bid (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D545317D1 FOREIGN KEY (vehicle_id) REFERENCES vehicle (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D57125544 FOREIGN KEY (execution_id) REFERENCES shipment_execution (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_execution DROP FOREIGN KEY FK_38B3D10BC3423909'); - $this->addSql('ALTER TABLE shipment_execution DROP FOREIGN KEY FK_38B3D10B545317D1'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313DC3423909'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D38459F23'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D7BE036FC'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D4D9866B8'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D545317D1'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D57125544'); - $this->addSql('DROP TABLE shipment_execution'); - $this->addSql('DROP TABLE shipment_order'); - } -} diff --git a/migrations/Version20230926131517.php b/migrations/Version20230926131517.php deleted file mode 100644 index 60f357f..0000000 --- a/migrations/Version20230926131517.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('CREATE TABLE shipment_order_activity (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_order_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', reference VARCHAR(32) NOT NULL, type VARCHAR(16) NOT NULL, label VARCHAR(64) NOT NULL, description LONGTEXT DEFAULT NULL, occured_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_CF6FE6512BC89259 (shipment_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_order_activity ADD CONSTRAINT FK_CF6FE6512BC89259 FOREIGN KEY (shipment_order_id) REFERENCES shipment_order (id)'); - $this->addSql('ALTER TABLE shipment_order ADD expected_pickup_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD expected_delivery_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD activity_count INT NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_order_activity DROP FOREIGN KEY FK_CF6FE6512BC89259'); - $this->addSql('DROP TABLE shipment_order_activity'); - $this->addSql('ALTER TABLE shipment_order DROP expected_pickup_at, DROP expected_delivery_at, DROP activity_count'); - } -} diff --git a/migrations/Version20230926195133.php b/migrations/Version20230926195133.php deleted file mode 100644 index 40cd33b..0000000 --- a/migrations/Version20230926195133.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('CREATE TABLE shipment_order_charge (id INT AUTO_INCREMENT NOT NULL, shipment_order_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', label VARCHAR(32) NOT NULL, amount INT NOT NULL, type VARCHAR(16) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_61A9DD242BC89259 (shipment_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_order_charge ADD CONSTRAINT FK_61A9DD242BC89259 FOREIGN KEY (shipment_order_id) REFERENCES shipment_order (id)'); - $this->addSql('ALTER TABLE shipment_order ADD code VARCHAR(32) NOT NULL, ADD currency VARCHAR(3) NOT NULL, ADD subtotal INT NOT NULL, ADD charge_total INT NOT NULL, ADD total INT NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_order_charge DROP FOREIGN KEY FK_61A9DD242BC89259'); - $this->addSql('DROP TABLE shipment_order_charge'); - $this->addSql('ALTER TABLE shipment_order DROP code, DROP currency, DROP subtotal, DROP charge_total, DROP total'); - } -} diff --git a/migrations/Version20230927122458.php b/migrations/Version20230927122458.php deleted file mode 100644 index 6511469..0000000 --- a/migrations/Version20230927122458.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE shipment_order_charge CHANGE id id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_order_charge CHANGE id id INT AUTO_INCREMENT NOT NULL'); - } -} diff --git a/migrations/Version20230927162021.php b/migrations/Version20230927162021.php deleted file mode 100644 index fee1da8..0000000 --- a/migrations/Version20230927162021.php +++ /dev/null @@ -1,47 +0,0 @@ -addSql('CREATE TABLE shipment_document (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_document_attachment (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', document_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', type VARCHAR(32) NOT NULL, src VARCHAR(64) NOT NULL, caption VARCHAR(255) DEFAULT NULL, meta LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', INDEX IDX_D2902EB5C33F7837 (document_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipment_proof_document (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_document_attachment ADD CONSTRAINT FK_D2902EB5C33F7837 FOREIGN KEY (document_id) REFERENCES shipment_document (id)'); - $this->addSql('ALTER TABLE shipment_order ADD pickup_confirmation_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', ADD proof_of_delivery_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\''); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D68326688 FOREIGN KEY (pickup_confirmation_id) REFERENCES shipment_document (id)'); - $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D9B5B8FB1 FOREIGN KEY (proof_of_delivery_id) REFERENCES shipment_document (id)'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_79E4313D68326688 ON shipment_order (pickup_confirmation_id)'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_79E4313D9B5B8FB1 ON shipment_order (proof_of_delivery_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D68326688'); - $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D9B5B8FB1'); - $this->addSql('ALTER TABLE shipment_document_attachment DROP FOREIGN KEY FK_D2902EB5C33F7837'); - $this->addSql('DROP TABLE shipment_document'); - $this->addSql('DROP TABLE shipment_document_attachment'); - $this->addSql('DROP TABLE shipment_proof_document'); - $this->addSql('DROP INDEX UNIQ_79E4313D68326688 ON shipment_order'); - $this->addSql('DROP INDEX UNIQ_79E4313D9B5B8FB1 ON shipment_order'); - $this->addSql('ALTER TABLE shipment_order DROP pickup_confirmation_id, DROP proof_of_delivery_id'); - } -} diff --git a/migrations/Version20230928055828.php b/migrations/Version20230928055828.php deleted file mode 100644 index 2241957..0000000 --- a/migrations/Version20230928055828.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE shipment_execution ADD code VARCHAR(32) NOT NULL, ADD status VARCHAR(32) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_execution DROP code, DROP status'); - } -} diff --git a/migrations/Version20230930081522.php b/migrations/Version20230930081522.php deleted file mode 100644 index 030a313..0000000 --- a/migrations/Version20230930081522.php +++ /dev/null @@ -1,37 +0,0 @@ -addSql('CREATE TABLE shipment_order_shipment_document (shipment_order_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', shipment_document_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', INDEX IDX_4D2269C72BC89259 (shipment_order_id), INDEX IDX_4D2269C7EC01E0A3 (shipment_document_id), PRIMARY KEY(shipment_order_id, shipment_document_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE shipment_order_shipment_document ADD CONSTRAINT FK_4D2269C72BC89259 FOREIGN KEY (shipment_order_id) REFERENCES shipment_order (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE shipment_order_shipment_document ADD CONSTRAINT FK_4D2269C7EC01E0A3 FOREIGN KEY (shipment_document_id) REFERENCES shipment_document (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE shipment_document ADD meta LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', ADD type VARCHAR(32) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_order_shipment_document DROP FOREIGN KEY FK_4D2269C72BC89259'); - $this->addSql('ALTER TABLE shipment_order_shipment_document DROP FOREIGN KEY FK_4D2269C7EC01E0A3'); - $this->addSql('DROP TABLE shipment_order_shipment_document'); - $this->addSql('ALTER TABLE shipment_document DROP meta, DROP type'); - } -} diff --git a/migrations/Version20230930084905.php b/migrations/Version20230930084905.php deleted file mode 100644 index 31c3d50..0000000 --- a/migrations/Version20230930084905.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE shipment_document_attachment CHANGE src src VARCHAR(225) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE shipment_document_attachment CHANGE src src VARCHAR(64) NOT NULL'); - } -} diff --git a/migrations/Version20231002162742.php b/migrations/Version20231002162742.php new file mode 100644 index 0000000..9081372 --- /dev/null +++ b/migrations/Version20231002162742.php @@ -0,0 +1,57 @@ +addSql('CREATE TABLE frames_channel_participants (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_8F504A0BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE frames_channels (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE frames_message_attachments (id INT AUTO_INCREMENT NOT NULL, message_id INT NOT NULL, type VARCHAR(32) NOT NULL, uri VARCHAR(255) NOT NULL, caption VARCHAR(128) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_D340B496537A1329 (message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE frames_messages (id INT AUTO_INCREMENT NOT NULL, sender_id INT NOT NULL, title VARCHAR(64) DEFAULT NULL, body LONGTEXT DEFAULT NULL, INDEX IDX_F6B8C09AF624B39D (sender_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE frames_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(64) NOT NULL, short_name VARCHAR(16) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE review (id INT AUTO_INCREMENT NOT NULL, rating SMALLINT NOT NULL, description VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE unit_review (id INT AUTO_INCREMENT NOT NULL, review_id INT NOT NULL, rating SMALLINT NOT NULL, description VARCHAR(255) DEFAULT NULL, type VARCHAR(32) NOT NULL, INDEX IDX_EE1A6A303E2E969B (review_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE frames_channel_participants ADD CONSTRAINT FK_8F504A0BA76ED395 FOREIGN KEY (user_id) REFERENCES frames_users (id)'); + $this->addSql('ALTER TABLE frames_message_attachments ADD CONSTRAINT FK_D340B496537A1329 FOREIGN KEY (message_id) REFERENCES frames_messages (id)'); + $this->addSql('ALTER TABLE frames_messages ADD CONSTRAINT FK_F6B8C09AF624B39D FOREIGN KEY (sender_id) REFERENCES frames_channel_participants (id)'); + $this->addSql('ALTER TABLE unit_review ADD CONSTRAINT FK_EE1A6A303E2E969B FOREIGN KEY (review_id) REFERENCES review (id)'); + $this->addSql('ALTER TABLE shipment_order ADD review_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE shipment_order ADD CONSTRAINT FK_79E4313D3E2E969B FOREIGN KEY (review_id) REFERENCES review (id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_79E4313D3E2E969B ON shipment_order (review_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE shipment_order DROP FOREIGN KEY FK_79E4313D3E2E969B'); + $this->addSql('ALTER TABLE frames_channel_participants DROP FOREIGN KEY FK_8F504A0BA76ED395'); + $this->addSql('ALTER TABLE frames_message_attachments DROP FOREIGN KEY FK_D340B496537A1329'); + $this->addSql('ALTER TABLE frames_messages DROP FOREIGN KEY FK_F6B8C09AF624B39D'); + $this->addSql('ALTER TABLE unit_review DROP FOREIGN KEY FK_EE1A6A303E2E969B'); + $this->addSql('DROP TABLE frames_channel_participants'); + $this->addSql('DROP TABLE frames_channels'); + $this->addSql('DROP TABLE frames_message_attachments'); + $this->addSql('DROP TABLE frames_messages'); + $this->addSql('DROP TABLE frames_users'); + $this->addSql('DROP TABLE review'); + $this->addSql('DROP TABLE unit_review'); + $this->addSql('DROP INDEX UNIQ_79E4313D3E2E969B ON shipment_order'); + $this->addSql('ALTER TABLE shipment_order DROP review_id'); + } +} diff --git a/migrations/Version20231003045329.php b/migrations/Version20231003045329.php new file mode 100644 index 0000000..88de98f --- /dev/null +++ b/migrations/Version20231003045329.php @@ -0,0 +1,41 @@ +addSql('CREATE TABLE assessment_parameter (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', code VARCHAR(32) NOT NULL, title VARCHAR(16) NOT NULL, subtitle VARCHAR(32) NOT NULL, description LONGTEXT DEFAULT NULL, icon VARCHAR(32) DEFAULT NULL, updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_F8E662FC77153098 (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE review CHANGE id id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\''); + $this->addSql('ALTER TABLE shipment_order CHANGE review_id review_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\''); + $this->addSql('ALTER TABLE unit_review ADD paramter_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', CHANGE id id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', CHANGE review_id review_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\''); + $this->addSql('ALTER TABLE unit_review ADD CONSTRAINT FK_EE1A6A301AA229DD FOREIGN KEY (paramter_id) REFERENCES assessment_parameter (id)'); + $this->addSql('CREATE INDEX IDX_EE1A6A301AA229DD ON unit_review (paramter_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE unit_review DROP FOREIGN KEY FK_EE1A6A301AA229DD'); + $this->addSql('DROP TABLE assessment_parameter'); + $this->addSql('ALTER TABLE review CHANGE id id INT AUTO_INCREMENT NOT NULL'); + $this->addSql('ALTER TABLE shipment_order CHANGE review_id review_id INT DEFAULT NULL'); + $this->addSql('DROP INDEX IDX_EE1A6A301AA229DD ON unit_review'); + $this->addSql('ALTER TABLE unit_review DROP paramter_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE review_id review_id INT NOT NULL'); + } +} diff --git a/src/DataFixtures/AppFixtures.php b/src/DataFixtures/AppFixtures.php new file mode 100644 index 0000000..987f6fe --- /dev/null +++ b/src/DataFixtures/AppFixtures.php @@ -0,0 +1,17 @@ +persist($product); + + $manager->flush(); + } +} diff --git a/src/DataFixtures/Shipment/Assessment/AssessmentParameterFixtures.php b/src/DataFixtures/Shipment/Assessment/AssessmentParameterFixtures.php new file mode 100644 index 0000000..9cde871 --- /dev/null +++ b/src/DataFixtures/Shipment/Assessment/AssessmentParameterFixtures.php @@ -0,0 +1,66 @@ + 'handling', + 'title' => 'Handling', + 'subtitle' => 'How well did this driver handle your shipment?', + 'icon' => 'mdi-driver' + ], + [ + 'code' => 'speed', + 'title' => 'Fast Delivery', + 'subtitle' => 'How satisfied are you with the drivers\'s time to delivery', + 'icon' => 'mdi-speed' + ], + [ + 'code' => 'communication', + 'title' => 'Communication', + 'subtitle' => 'How much necesarry information was passed to you by the driver', + 'icon' => 'mdi-communication' + ], + ]; + + + foreach ($data as $entry) { + $existing = $this->assessmentParameterRepository->findOneBy(['code' => $entry['code']]); + + if ($existing) + continue; + $parameter = new AssessmentParameter(); + $parameter + ->setCode($entry['code']) + ->setTitle($entry['title']) + ->setSubtitle($entry['subtitle']) + ->setIcon($entry['icon']); + $manager->persist($parameter); + } + + $manager->flush(); + + // other fixtures can get this object using the UserFixtures::ADMIN_USER_REFERENCE constant + // $this->addReference(self::ADMIN_USER_REFERENCE, $userAdmin); + } +} diff --git a/src/Entity/Chat/AbstractMessage.php b/src/Entity/Chat/AbstractMessage.php new file mode 100644 index 0000000..b3d6b33 --- /dev/null +++ b/src/Entity/Chat/AbstractMessage.php @@ -0,0 +1,179 @@ +attachments = new ArrayCollection(); + $this->chatMessageViews = new ArrayCollection(); + $this->id = $id; + $this->createdAt = new \DateTimeImmutable(); + } + + public function getId(): ?Ulid + { + return $this->id; + } + + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(?string $title): self + { + $this->title = $title; + + return $this; + } + + public function getBody(): ?string + { + return $this->body; + } + + public function setBody(string $body): self + { + $this->body = $body; + + return $this; + } + + /** + * @return Collection + */ + public function getAttachments(): Collection + { + return $this->attachments; + } + + public function addAttachment(ChatMessageAttachment $attachment): self + { + if (!$this->attachments->contains($attachment)) { + $this->attachments->add($attachment); + $attachment->setMessage($this); + } + + return $this; + } + + public function removeAttachment(ChatMessageAttachment $attachment): self + { + if ($this->attachments->removeElement($attachment)) { + // set the owning side to null (unless already changed) + if ($attachment->getMessage() === $this) { + $attachment->setMessage(null); + } + } + + return $this; + } + + public function getSentAt(): ?\DateTimeImmutable + { + return $this->sentAt; + } + + public function setSentAt(?\DateTimeImmutable $sentAt): self + { + $this->sentAt = $sentAt; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): self + { + $this->createdAt = $createdAt; + + return $this; + } + + + + /** + * @return Collection + */ + public function getChatMessageViews(): Collection + { + return $this->chatMessageViews; + } + + public function addChatMessageView(ChatMessageView $chatMessageView): self + { + if (!$this->chatMessageViews->contains($chatMessageView)) { + $this->chatMessageViews->add($chatMessageView); + $chatMessageView->setMessage($this); + } + + return $this; + } + + public function removeChatMessageView(ChatMessageView $chatMessageView): self + { + if ($this->chatMessageViews->removeElement($chatMessageView)) { + // set the owning side to null (unless already changed) + if ($chatMessageView->getMessage() === $this) { + $chatMessageView->setMessage(null); + } + } + + return $this; + } + +} diff --git a/src/Entity/Chat/ChatMessage.php b/src/Entity/Chat/ChatMessage.php index 3ca7fe7..5c89558 100644 --- a/src/Entity/Chat/ChatMessage.php +++ b/src/Entity/Chat/ChatMessage.php @@ -3,22 +3,13 @@ namespace App\Entity\Chat; use App\Repository\Chat\ChatMessageRepository; -use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Overblog\GraphQLBundle\Annotation as GQL; -use Symfony\Bridge\Doctrine\Types\UlidType; -use Symfony\Component\Uid\Ulid; #[GQL\Type()] #[ORM\Entity(repositoryClass: ChatMessageRepository::class)] -class ChatMessage +class ChatMessage extends AbstractMessage { - #[GQL\Field(type: 'Ulid')] - #[ORM\Id] - #[ORM\GeneratedValue] - #[ORM\Column(type: UlidType::NAME)] - private ?Ulid $id = null; #[GQL\Field()] #[ORM\ManyToOne(inversedBy: 'messages')] @@ -28,58 +19,12 @@ class ChatMessage #[GQL\Field()] #[ORM\ManyToOne(inversedBy: 'messages')] private ?ChatSubject $subject = null; - + #[GQL\Field()] #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?ChatParticipant $participant = null; - #[GQL\Field()] - #[ORM\Column(length: 100, nullable: true)] - private ?string $title = null; //VERY MUCH OPTIONAL - - #[GQL\Field()] - #[ORM\Column(length: 4000)] - private ?string $body = null; - - - /** - * @var ChatMessageAttachment[] - */ - #[GQL\Field()] - #[ORM\OneToMany(mappedBy: 'message', targetEntity: ChatMessageAttachment::class, orphanRemoval: true)] - private Collection $attachments; - - /** - * @var ChatMessageView[] - */ - #[GQL\Field()] - #[ORM\OneToMany(mappedBy: 'message', targetEntity: ChatMessageView::class, orphanRemoval: true)] - private Collection $chatMessageViews; - - #[GQL\Field(type: 'DateTime')] - #[ORM\Column(nullable: true)] - private ?\DateTimeImmutable $sentAt = null; - - - #[GQL\Field(type: 'DateTime')] - #[ORM\Column] - private ?\DateTimeImmutable $createdAt = null; - - - - public function __construct(?Ulid $id = null) - { - $this->attachments = new ArrayCollection(); - $this->chatMessageViews = new ArrayCollection(); - $this->id = $id; - $this->createdAt = new \DateTimeImmutable(); - } - - public function getId(): ?Ulid - { - return $this->id; - } public function getChannel(): ?ChatChannel { @@ -105,7 +50,7 @@ public function setSubject(?ChatSubject $subject): self return $this; } - + public function getParticipant(): ?ChatParticipant { return $this->participant; @@ -117,115 +62,4 @@ public function setParticipant(?ChatParticipant $participant): self return $this; } - - public function getTitle(): ?string - { - return $this->title; - } - - public function setTitle(?string $title): self - { - $this->title = $title; - - return $this; - } - - public function getBody(): ?string - { - return $this->body; - } - - public function setBody(string $body): self - { - $this->body = $body; - - return $this; - } - - /** - * @return Collection - */ - public function getAttachments(): Collection - { - return $this->attachments; - } - - public function addAttachment(ChatMessageAttachment $attachment): self - { - if (!$this->attachments->contains($attachment)) { - $this->attachments->add($attachment); - $attachment->setMessage($this); - } - - return $this; - } - - public function removeAttachment(ChatMessageAttachment $attachment): self - { - if ($this->attachments->removeElement($attachment)) { - // set the owning side to null (unless already changed) - if ($attachment->getMessage() === $this) { - $attachment->setMessage(null); - } - } - - return $this; - } - - public function getSentAt(): ?\DateTimeImmutable - { - return $this->sentAt; - } - - public function setSentAt(?\DateTimeImmutable $sentAt): self - { - $this->sentAt = $sentAt; - - return $this; - } - - public function getCreatedAt(): ?\DateTimeImmutable - { - return $this->createdAt; - } - - public function setCreatedAt(\DateTimeImmutable $createdAt): self - { - $this->createdAt = $createdAt; - - return $this; - } - - - - /** - * @return Collection - */ - public function getChatMessageViews(): Collection - { - return $this->chatMessageViews; - } - - public function addChatMessageView(ChatMessageView $chatMessageView): self - { - if (!$this->chatMessageViews->contains($chatMessageView)) { - $this->chatMessageViews->add($chatMessageView); - $chatMessageView->setMessage($this); - } - - return $this; - } - - public function removeChatMessageView(ChatMessageView $chatMessageView): self - { - if ($this->chatMessageViews->removeElement($chatMessageView)) { - // set the owning side to null (unless already changed) - if ($chatMessageView->getMessage() === $this) { - $chatMessageView->setMessage(null); - } - } - - return $this; - } - } diff --git a/src/Entity/Chat/ChatMessageAttachment.php b/src/Entity/Chat/ChatMessageAttachment.php index 8be7209..f6d5ecd 100644 --- a/src/Entity/Chat/ChatMessageAttachment.php +++ b/src/Entity/Chat/ChatMessageAttachment.php @@ -21,7 +21,7 @@ class ChatMessageAttachment #[GQL\Field()] #[ORM\ManyToOne(inversedBy: 'attachments')] #[ORM\JoinColumn(nullable: false)] - private ?ChatMessage $message = null; + private ?AbstractMessage $message = null; #[GQL\Field()] #[ORM\Column(length: 255)] @@ -40,12 +40,12 @@ public function getId(): ?Ulid return $this->id; } - public function getMessage(): ?ChatMessage + public function getMessage(): ?AbstractMessage { return $this->message; } - public function setMessage(?ChatMessage $message): self + public function setMessage(?AbstractMessage $message): self { $this->message = $message; diff --git a/src/Entity/Chat/DM/Conversation.php b/src/Entity/Chat/DM/Conversation.php new file mode 100644 index 0000000..623a970 --- /dev/null +++ b/src/Entity/Chat/DM/Conversation.php @@ -0,0 +1,118 @@ +messages = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getSender(): ?Participant + { + return $this->sender; + } + + public function setSender(?Participant $sender): static + { + $this->sender = $sender; + + return $this; + } + + public function getReceiver(): ?Participant + { + return $this->receiver; + } + + public function setReceiver(?Participant $receiver): static + { + $this->receiver = $receiver; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @return Collection + */ + public function getMessages(): Collection + { + return $this->messages; + } + + public function addMessage(Message $message): static + { + if (!$this->messages->contains($message)) { + $this->messages->add($message); + $message->setConversation($this); + } + + return $this; + } + + public function removeMessage(Message $message): static + { + if ($this->messages->removeElement($message)) { + // set the owning side to null (unless already changed) + if ($message->getConversation() === $this) { + $message->setConversation(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Chat/DM/Message.php b/src/Entity/Chat/DM/Message.php new file mode 100644 index 0000000..891659e --- /dev/null +++ b/src/Entity/Chat/DM/Message.php @@ -0,0 +1,32 @@ +conversation; + } + + public function setConversation(?Conversation $conversation): static + { + $this->conversation = $conversation; + + return $this; + } +} diff --git a/src/Entity/Chat/DM/Participant.php b/src/Entity/Chat/DM/Participant.php new file mode 100644 index 0000000..8fb6c9a --- /dev/null +++ b/src/Entity/Chat/DM/Participant.php @@ -0,0 +1,99 @@ +conversations = new ArrayCollection(); + } + + public function getId(): ?Ulid + { + return $this->id; + } + + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabel(string $label): static + { + $this->label = $label; + + return $this; + } + + public function getReference(): ?string + { + return $this->reference; + } + + public function setReference(string $reference): static + { + $this->reference = $reference; + + return $this; + } + + /** + * @return Collection + */ + public function getConversations(): Collection + { + return $this->conversations; + } + + public function addConversation(Conversation $conversation): static + { + if (!$this->conversations->contains($conversation)) { + $this->conversations->add($conversation); + $conversation->setSender($this); + } + + return $this; + } + + public function removeConversation(Conversation $conversation): static + { + if ($this->conversations->removeElement($conversation)) { + // set the owning side to null (unless already changed) + if ($conversation->getSender() === $this) { + $conversation->setSender(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Frames/Chat/Channel.php b/src/Entity/Frames/Chat/Channel.php new file mode 100644 index 0000000..d9c6213 --- /dev/null +++ b/src/Entity/Frames/Chat/Channel.php @@ -0,0 +1,21 @@ +id; + } +} diff --git a/src/Entity/Frames/Chat/ChannelParticipant.php b/src/Entity/Frames/Chat/ChannelParticipant.php new file mode 100644 index 0000000..f8af621 --- /dev/null +++ b/src/Entity/Frames/Chat/ChannelParticipant.php @@ -0,0 +1,92 @@ +messages = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getUser(): ?User + { + return $this->user; + } + + public function setUser(?User $user): static + { + $this->user = $user; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @return Collection + */ + public function getMessages(): Collection + { + return $this->messages; + } + + public function addMessage(Message $message): static + { + if (!$this->messages->contains($message)) { + $this->messages->add($message); + $message->setSender($this); + } + + return $this; + } + + public function removeMessage(Message $message): static + { + if ($this->messages->removeElement($message)) { + // set the owning side to null (unless already changed) + if ($message->getSender() === $this) { + $message->setSender(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Frames/Chat/Message.php b/src/Entity/Frames/Chat/Message.php new file mode 100644 index 0000000..0f461e6 --- /dev/null +++ b/src/Entity/Frames/Chat/Message.php @@ -0,0 +1,108 @@ +attachments = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getSender(): ?ChannelParticipant + { + return $this->sender; + } + + public function setSender(?ChannelParticipant $sender): static + { + $this->sender = $sender; + + return $this; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(?string $title): static + { + $this->title = $title; + + return $this; + } + + public function getBody(): ?string + { + return $this->body; + } + + public function setBody(?string $body): static + { + $this->body = $body; + + return $this; + } + + /** + * @return Collection + */ + public function getAttachments(): Collection + { + return $this->attachments; + } + + public function addAttachment(MessageAttachment $attachment): static + { + if (!$this->attachments->contains($attachment)) { + $this->attachments->add($attachment); + $attachment->setMessage($this); + } + + return $this; + } + + public function removeAttachment(MessageAttachment $attachment): static + { + if ($this->attachments->removeElement($attachment)) { + // set the owning side to null (unless already changed) + if ($attachment->getMessage() === $this) { + $attachment->setMessage(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Frames/Chat/MessageAttachment.php b/src/Entity/Frames/Chat/MessageAttachment.php new file mode 100644 index 0000000..d85ecc1 --- /dev/null +++ b/src/Entity/Frames/Chat/MessageAttachment.php @@ -0,0 +1,97 @@ +id; + } + + public function getMessage(): ?Message + { + return $this->message; + } + + public function setMessage(?Message $message): static + { + $this->message = $message; + + return $this; + } + + public function getType(): ?string + { + return $this->type; + } + + public function setType(string $type): static + { + $this->type = $type; + + return $this; + } + + public function getUri(): ?string + { + return $this->uri; + } + + public function setUri(string $uri): static + { + $this->uri = $uri; + + return $this; + } + + public function getCaption(): ?string + { + return $this->caption; + } + + public function setCaption(?string $caption): static + { + $this->caption = $caption; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } +} diff --git a/src/Entity/Frames/Chat/User.php b/src/Entity/Frames/Chat/User.php new file mode 100644 index 0000000..5334140 --- /dev/null +++ b/src/Entity/Frames/Chat/User.php @@ -0,0 +1,51 @@ +id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): static + { + $this->name = $name; + + return $this; + } + + public function getShortName(): ?string + { + return $this->shortName; + } + + public function setShortName(?string $shortName): static + { + $this->shortName = $shortName; + + return $this; + } +} diff --git a/src/Entity/Shipment/Assessment/AssessmentParameter.php b/src/Entity/Shipment/Assessment/AssessmentParameter.php new file mode 100644 index 0000000..b7646ca --- /dev/null +++ b/src/Entity/Shipment/Assessment/AssessmentParameter.php @@ -0,0 +1,145 @@ +createdAt = new \DateTimeImmutable(); + } + + public function getId(): ?Ulid + { + return $this->id; + } + + public function getCode(): ?string + { + return $this->code; + } + + public function setCode(string $code): static + { + $this->code = $code; + + return $this; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): static + { + $this->title = $title; + + return $this; + } + + public function getSubtitle(): ?string + { + return $this->subtitle; + } + + public function setSubtitle(string $subtitle): static + { + $this->subtitle = $subtitle; + + return $this; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } + + public function getIcon(): ?string + { + return $this->icon; + } + + public function setIcon(?string $icon): static + { + $this->icon = $icon; + + return $this; + } + + public function getUpdatedAt(): ?\DateTimeImmutable + { + return $this->updatedAt; + } + + public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static + { + $this->updatedAt = $updatedAt; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } +} diff --git a/src/Entity/Shipment/Assessment/Review.php b/src/Entity/Shipment/Assessment/Review.php new file mode 100644 index 0000000..81d2dce --- /dev/null +++ b/src/Entity/Shipment/Assessment/Review.php @@ -0,0 +1,129 @@ +unitReviews = new ArrayCollection(); + $this->createdAt = new \DateTimeImmutable(); + } + + public function getId(): ?Ulid + { + return $this->id; + } + + public function getRating(): ?int + { + return $this->rating; + } + + public function setRating(int $rating): static + { + $this->rating = $rating; + + return $this; + } + + + public function calculateRating() + { + $rating = 0; + foreach ($this->getUnitReviews() as $unitReview) { + $rating += $unitReview->getRating() ?? 0; + } + $this->rating = $rating; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } + + /** + * @return Collection + */ + public function getUnitReviews(): Collection + { + return $this->unitReviews; + } + + public function addUnitReview(UnitReview $unitReview): static + { + if (!$this->unitReviews->contains($unitReview)) { + $this->unitReviews->add($unitReview); + $unitReview->setReview($this); + } + $this->calculateRating(); + + return $this; + } + + public function removeUnitReview(UnitReview $unitReview): static + { + if ($this->unitReviews->removeElement($unitReview)) { + // set the owning side to null (unless already changed) + if ($unitReview->getReview() === $this) { + $unitReview->setReview(null); + } + } + $this->calculateRating(); + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } +} diff --git a/src/Entity/Shipment/Assessment/UnitReview.php b/src/Entity/Shipment/Assessment/UnitReview.php new file mode 100644 index 0000000..e2484f3 --- /dev/null +++ b/src/Entity/Shipment/Assessment/UnitReview.php @@ -0,0 +1,109 @@ +id; + } + + public function getRating(): ?int + { + return $this->rating; + } + + public function setRating(int $rating): static + { + $this->rating = $rating; + + return $this; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } + + public function getType(): ?string + { + return $this->type; + } + + public function setType(string $type): static + { + $this->type = $type; + + return $this; + } + + public function getReview(): ?Review + { + return $this->review; + } + + public function setReview(?Review $review): static + { + $this->review = $review; + + return $this; + } + + public function getParamter(): ?AssessmentParameter + { + return $this->paramter; + } + + public function setParamter(?AssessmentParameter $paramter): static + { + $this->paramter = $paramter; + + return $this; + } +} diff --git a/src/Entity/Shipment/Document/ShipmentDocumentAttachment.php b/src/Entity/Shipment/Document/ShipmentDocumentAttachment.php index 8d102b6..bcc3458 100644 --- a/src/Entity/Shipment/Document/ShipmentDocumentAttachment.php +++ b/src/Entity/Shipment/Document/ShipmentDocumentAttachment.php @@ -23,7 +23,7 @@ class ShipmentDocumentAttachment #[ORM\Column(length: 32, enumType: ShipmentDocumentAttachmentType::class)] private ?ShipmentDocumentAttachmentType $type = null; - #[GQL\Field()] + #[GQL\Field(type:'FileURI')] #[ORM\Column(length: 225)] private ?string $src = null; diff --git a/src/Entity/Shipment/Shipment.php b/src/Entity/Shipment/Shipment.php index f1cdb73..8f93239 100644 --- a/src/Entity/Shipment/Shipment.php +++ b/src/Entity/Shipment/Shipment.php @@ -99,6 +99,7 @@ enumType: ShipmentStatus::class, )] private ?int $totalWeight = null; + #[GQL\Field()] #[ORM\OneToOne(mappedBy: 'shipment', cascade: ['persist', 'remove'])] private ?ShipmentOrder $shipmentOrder = null; @@ -191,6 +192,7 @@ public function addItem(ShipmentItem $item): static $this->items->add($item); $item->setShipment($this); } + $this->calculateWeight(); return $this; } @@ -203,7 +205,7 @@ public function removeItem(ShipmentItem $item): static $item->setShipment(null); } } - + $this->calculateWeight(); return $this; } @@ -342,6 +344,7 @@ public function calculateWeight(): int $weight += $iWeight; } } + $this->setTotalWeight($weight); return $weight; } diff --git a/src/Entity/Shipment/ShipmentOrder.php b/src/Entity/Shipment/ShipmentOrder.php index 2260fb8..cd3334f 100644 --- a/src/Entity/Shipment/ShipmentOrder.php +++ b/src/Entity/Shipment/ShipmentOrder.php @@ -4,6 +4,7 @@ use App\Entity\Account\Driver; use App\Entity\Account\User; +use App\Entity\Shipment\Assessment\Review; use App\Entity\Shipment\Document\ShipmentDocument; use App\Entity\Vehicle\Vehicle; use App\Repository\Shipment\ShipmentOrderRepository; @@ -125,6 +126,9 @@ class ShipmentOrder #[ORM\ManyToMany(targetEntity: ShipmentDocument::class, cascade:['persist', 'remove'])] private Collection $documents; + #[ORM\OneToOne(cascade: ['persist', 'remove'])] + private ?Review $review = null; + public function __construct() { @@ -483,4 +487,16 @@ public function removeDocument(ShipmentDocument $document): static return $this; } + + public function getReview(): ?Review + { + return $this->review; + } + + public function setReview(?Review $review): static + { + $this->review = $review; + + return $this; + } } diff --git a/src/GraphQL/Shipment/Input/Assessment/Parameter/ShipmentAssessmentParameterCreationInput.php b/src/GraphQL/Shipment/Input/Assessment/Parameter/ShipmentAssessmentParameterCreationInput.php new file mode 100644 index 0000000..9542cde --- /dev/null +++ b/src/GraphQL/Shipment/Input/Assessment/Parameter/ShipmentAssessmentParameterCreationInput.php @@ -0,0 +1,10 @@ +assessmentParameterRepository->find($id); + if ($parameter === null) { + throw new UserError( + message: "Cannot find shipment assessment parameter with [id:$id]" + ); + } + + // if (!$this->security->isGranted('view', $shipment)) { + // throw new UserError( + // message: "Permision Denied: You may not view this resource" + // ); + // } + return $parameter; + } + + #[GQL\Query(name: "get_shipment_assessment_parameter_list")] + // #[GQL\Access("isGranted('ROLE_USER')")] + public function getShipmentConnection( + ?int $first, + ?String $after, + ?String $filter, + ?String $sort, + ): ShipmentAssessmentParameterConnection { + + + $user = $this->security->getUser(); + if (!($user instanceof User)) { + throw new UserError("Permission Denied: You may not perform this operation"); + } + + $cb = new ConnectionBuilder( + null, + fn ($edges, PageInfoInterface $pageInfo) => new ShipmentAssessmentParameterConnection($edges, $pageInfo), + fn (string $coursor, AssessmentParameter $parameter, int $index) => new ShipmentAssessmentParameterEdge($coursor, $parameter) + ); + + $qb = $this->assessmentParameterRepository->createQueryBuilder('parameter'); + + QueryBuilderHelper::applyCriteria($qb, $filter, 'parameter'); + + $total = fn () => (int) (clone $qb)->select('COUNT(parameter.id)')->getQuery()->getSingleScalarResult(); + $paginator = new Paginator(function (?int $offset, ?int $limit) use ($qb) { + return $qb + ->setFirstResult($offset) + ->setMaxResults($limit) + ->getQuery() + ->getResult(); + }, false, $cb); + + return $paginator->auto(new Argument(['first' => $first, 'after' => $after]), $total); + } +} diff --git a/src/GraphQL/Shipment/Resolver/ClientShipmentDocumentResolver.php b/src/GraphQL/Shipment/Resolver/ClientShipmentDocumentResolver.php new file mode 100644 index 0000000..b271519 --- /dev/null +++ b/src/GraphQL/Shipment/Resolver/ClientShipmentDocumentResolver.php @@ -0,0 +1,133 @@ +shipmentDocumentRepository->find($id); + if ($document === null) { + throw new UserError( + message: "Cannot find shipment document with [id:$id]" + ); + } + + // if (!$this->security->isGranted('view', $shipment)) { + // throw new UserError( + // message: "Permision Denied: You may not view this resource" + // ); + // } + return $document; + } + + #[GQL\Query(name: "get_shipment_document_list")] + // #[GQL\Access("isGranted('ROLE_USER')")] + public function getShipmentConnection( + ?int $first, + ?String $after, + ?String $filter, + ?String $sort, + ): ShipmentDocumentConnection { + + + $user = $this->security->getUser(); + if (!($user instanceof User)) { + throw new UserError("Permission Denied: You may not perform this operation"); + } + + $cb = new ConnectionBuilder( + null, + fn ($edges, PageInfoInterface $pageInfo) => new ShipmentDocumentConnection($edges, $pageInfo), + fn (string $coursor, ShipmentDocument $document, int $index) => new ShipmentDocumentEdge($coursor, $document) + ); + + $qb = $this->shipmentDocumentRepository->createQueryBuilder('document'); + + $qb + ->innerJoin('document.shipmentOrder', 'shipmentOrder') + ->innerJoin('shipmentOrder.shipment', 'shipment') + ->innerJoin('shipment.owner', 'owner') + ->andWhere("owner.id = :owner") + ->setParameter("owner", $user->getId(), UlidType::NAME); + + + QueryBuilderHelper::applyCriteria($qb, $filter, 'document'); + + $total = fn () => (int) (clone $qb)->select('COUNT(document.id)')->getQuery()->getSingleScalarResult(); + $paginator = new Paginator(function (?int $offset, ?int $limit) use ($qb) { + return $qb + ->setFirstResult($offset) + ->setMaxResults($limit) + ->getQuery() + ->getResult(); + }, false, $cb); + + return $paginator->auto(new Argument(['first' => $first, 'after' => $after]), $total); + } +} diff --git a/src/GraphQL/Shipment/Resolver/ClientShipmentResolver.php b/src/GraphQL/Shipment/Resolver/ClientShipmentResolver.php index 4deb2d6..35479dc 100644 --- a/src/GraphQL/Shipment/Resolver/ClientShipmentResolver.php +++ b/src/GraphQL/Shipment/Resolver/ClientShipmentResolver.php @@ -5,15 +5,21 @@ use App\Entity\Account\User; use App\Entity\Addressing\UserAddress; use App\Entity\Catalog\UserProduct; +use App\Entity\Shipment\Assessment\Review; +use App\Entity\Shipment\Assessment\UnitReview; use App\Entity\Shipment\Shipment; use App\Entity\Shipment\ShipmentBidStatus; use App\Entity\Shipment\ShipmentDriverBid; use App\Entity\Shipment\ShipmentItem; use App\Entity\Shipment\ShipmentOrder; use App\Entity\Shipment\ShipmentStatus; +use App\GraphQL\Shipment\Input\Assessment\ShipmentOrderReviewInput; use App\GraphQL\Shipment\Input\ShipmentCreationInput; use App\GraphQL\Shipment\Input\ShipmentItemInput; +use App\GraphQL\Shipment\Input\ShipmentPublicationInput; use App\GraphQL\Shipment\Type\ShipmentConnection; +use App\GraphQL\Shipment\Type\ShipmentDriverBidConnection; +use App\GraphQL\Shipment\Type\ShipmentDriverBidEdge; use App\GraphQL\Shipment\Type\ShipmentEdge; use App\Repository\Addressing\UserAddressRepository; use App\Repository\Catalog\UserProductRepository; @@ -199,6 +205,142 @@ private function buildShipmentItem(ShipmentItemInput $input, User $user): Shipme + + + + #[GQL\Mutation()] + #[GQL\Arg(name: 'id', type: 'Ulid!')] + #[GQL\Arg(name: 'input', type: 'ShipmentPublicationInput')] + public function publishShipment(Ulid $id, ?ShipmentPublicationInput $input): Shipment + { + $user = $this->getUser(); + $shipment = $this->getUserShipment($id, $user); + + if ($shipment->getStatus() != ShipmentStatus::PENDING) { + $message = sprintf( + "Only \"%s\" Shipments can be published. Shipment is in the \"%s\" state", + ShipmentStatus::PENDING->name, + $shipment->getStatus()?->name + ); + throw new UserError($message); + } + + if ($budget = $input?->budget) { + $shipment->setBudget($budget->toInstance()); + } + $shipment->setStatus(ShipmentStatus::PUBLISHED); + + $this->entityManager->persist($shipment); + $this->entityManager->flush(); + + return $shipment; + } + + + + + #[GQL\Mutation()] + #[GQL\Arg(name: 'id', type: 'Ulid!')] + #[GQL\Arg(name: 'input', type: 'ShipmentOrderReviewInput')] + public function reviewShipment(Ulid $id, ?ShipmentOrderReviewInput $input): Shipment + { + $user = $this->getUser(); + $shipment = $this->getUserShipment($id, $user); + + if ($shipment->getStatus() != ShipmentStatus::DELIVERED) { + $message = sprintf( + "Only \"%s\" Shipments can be published. Shipment is in the \"%s\" state", + ShipmentStatus::DELIVERED->name, + $shipment->getStatus()?->name + ); + throw new UserError($message); + } + + $review = new Review(); + $review->setDescription($input->description); + + foreach ($input->unitReviews as $uRevInputs) { + $unitReview = new UnitReview(); + $unitReview + ->setRating($uRevInputs->rating) + ->setDescription($uRevInputs->description); + $review->addUnitReview($unitReview); + } + $shipment->setStatus(ShipmentStatus::COMPLETED); + + $this->entityManager->persist($shipment); + $this->entityManager->flush(); + + return $shipment; + } + + + + + + + + ///////////////////////////////////////// + // SHIPMENT BIDDING AND LISTING FROM HERE + ///////////////////////////////// + + + #[Query(name: "get_shipment_bid_item",)] + #[GQL\Arg( + name: 'id', + type: 'Ulid' + )] + public function getShipmentBidItem( + #[GQL\Arg(type: 'Ulid')] Ulid $id + ): ShipmentDriverBid { + $bid = $this->getUserShipmentBid($id); + return $bid; + } + + + #[GQL\Query(name: "get_shipment_bid_list")] + // #[GQL\Access("isGranted('ROLE_USER')")] + public function getShipmentDriverBidConnection( + ?int $first, + ?String $after, + ?String $filter, + ?String $sort, + ): ShipmentDriverBidConnection { + + $cb = new ConnectionBuilder( + null, + fn ($edges, PageInfoInterface $pageInfo) => new ShipmentDriverBidConnection($edges, $pageInfo), + fn (string $coursor, ShipmentDriverBid $bid, int $index) => new ShipmentDriverBidEdge($coursor, $bid) + ); + + $qb = $this->shipmentDriverBidRepository->createQueryBuilder('bid'); + + QueryBuilderHelper::applyCriteria($qb, $filter, 'bid'); + + $user = $this->getUser(); + + $qb + ->innerJoin('bid.shipment', 'shipment') + ->innerJoin('shipment.owner', 'owner') + ->andWhere("owner.id = :owner") + ->setParameter("owner", $user->getId(), UlidType::NAME); + + $total = fn () => (int) (clone $qb)->select('COUNT(bid.id)')->getQuery()->getSingleScalarResult(); + + $paginator = new Paginator(function (?int $offset, ?int $limit) use ($qb) { + return $qb + ->setFirstResult($offset) + ->setMaxResults($limit) + ->getQuery() + ->getResult(); + }, false, $cb); + + return $paginator->auto(new Argument(['first' => $first, 'after' => $after]), $total); + } + + + + #[GQL\Mutation()] #[GQL\Arg(name: 'id', type: 'Ulid!')] public function acceptShipmentBid(Ulid $id): ShipmentOrder @@ -207,7 +349,7 @@ public function acceptShipmentBid(Ulid $id): ShipmentOrder $bid = $this->getUserShipmentBid($id); $shipment = $bid->getShipment(); - + if ($shipment->getShipmentOrder() != null) { throw new UserError("This shipment already has an order"); } @@ -233,14 +375,11 @@ public function acceptShipmentBid(Ulid $id): ShipmentOrder ->setCurrency($currency) ->setSubtotal($amount) ->setPickupAt($bid->getPickupAt() ?? $shipment->getPickupAt()) - ->setDeliveryAt($bid->getDeliveryAt() ?? $shipment->getDeliveryAt()) - - ; + ->setDeliveryAt($bid->getDeliveryAt() ?? $shipment->getDeliveryAt()); $shipment ->setShipmentOrder($order) - ->setStatus(ShipmentStatus::PROCESSING) - ; + ->setStatus(ShipmentStatus::PROCESSING); $bid->setStatus(ShipmentBidStatus::ACCEPTED); $this->entityManager->persist($shipment); @@ -251,7 +390,7 @@ public function acceptShipmentBid(Ulid $id): ShipmentOrder - + #[GQL\Mutation()] #[GQL\Arg(name: 'id', type: 'Ulid!')] @@ -261,7 +400,7 @@ public function rejectShipmentBid(Ulid $id): bool $bid = $this->getUserShipmentBid($id); $shipment = $bid->getShipment(); - + if ($shipment->getShipmentOrder()?->getBid() == $bid) { throw new UserError("This shipment bid already has an order"); } diff --git a/src/GraphQL/Shipment/Resolver/DriverShipmentOrderResolver.php b/src/GraphQL/Shipment/Resolver/DriverShipmentOrderResolver.php index 0738f33..0e0e98b 100644 --- a/src/GraphQL/Shipment/Resolver/DriverShipmentOrderResolver.php +++ b/src/GraphQL/Shipment/Resolver/DriverShipmentOrderResolver.php @@ -265,7 +265,7 @@ public function executeShipmentOrderDelivery(Ulid $id, ShipmentOrderNodeExecutio ); $order->setProofOfDelivery($document); $order->setStatus(ShipmentOrderStatus::DELIVERED); - $shipment->setStatus(ShipmentStatus::INTRANSIT); + $shipment->setStatus(ShipmentStatus::DELIVERED); $this->entityManager->persist($order); $this->entityManager->flush(); diff --git a/src/GraphQL/Shipment/Type/ShipmentAssessmentParameterConnection.php b/src/GraphQL/Shipment/Type/ShipmentAssessmentParameterConnection.php new file mode 100644 index 0000000..6fc613c --- /dev/null +++ b/src/GraphQL/Shipment/Type/ShipmentAssessmentParameterConnection.php @@ -0,0 +1,11 @@ +add($anHour); + if (preg_match('~^\w+:\/\/~i', $value)) { + return $this->mountManager->temporaryUrl($value, $expires); + } + return $this->filesystem->temporaryUrl($value, $expires); + } + + /** + * @param UploadedFile $value + * + * @return mixed + */ + public function parseValue($value): void + { + // return new \DateTimeImmutable($value); + } + + /** + * @param Node $valueNode + * + * @return UploadedFile|null + */ + public function parseLiteral($valueNode, array $variables = null): void + { + // return new \DateTimeImmutable($valueNode->value); + } +} diff --git a/src/Repository/Shipment/Assessment/AssessmentParameterRepository.php b/src/Repository/Shipment/Assessment/AssessmentParameterRepository.php new file mode 100644 index 0000000..5961a95 --- /dev/null +++ b/src/Repository/Shipment/Assessment/AssessmentParameterRepository.php @@ -0,0 +1,48 @@ + + * + * @method AssessmentParameter|null find($id, $lockMode = null, $lockVersion = null) + * @method AssessmentParameter|null findOneBy(array $criteria, array $orderBy = null) + * @method AssessmentParameter[] findAll() + * @method AssessmentParameter[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class AssessmentParameterRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, AssessmentParameter::class); + } + +// /** +// * @return AssessmentParameter[] Returns an array of AssessmentParameter objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('a') +// ->andWhere('a.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('a.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?AssessmentParameter +// { +// return $this->createQueryBuilder('a') +// ->andWhere('a.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/Shipment/Assessment/ReviewRepository.php b/src/Repository/Shipment/Assessment/ReviewRepository.php new file mode 100644 index 0000000..a5f6c32 --- /dev/null +++ b/src/Repository/Shipment/Assessment/ReviewRepository.php @@ -0,0 +1,48 @@ + + * + * @method Review|null find($id, $lockMode = null, $lockVersion = null) + * @method Review|null findOneBy(array $criteria, array $orderBy = null) + * @method Review[] findAll() + * @method Review[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ReviewRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Review::class); + } + +// /** +// * @return Review[] Returns an array of Review objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('r') +// ->andWhere('r.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('r.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Review +// { +// return $this->createQueryBuilder('r') +// ->andWhere('r.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/Shipment/Assessment/UnitReviewRepository.php b/src/Repository/Shipment/Assessment/UnitReviewRepository.php new file mode 100644 index 0000000..4705113 --- /dev/null +++ b/src/Repository/Shipment/Assessment/UnitReviewRepository.php @@ -0,0 +1,48 @@ + + * + * @method UnitReview|null find($id, $lockMode = null, $lockVersion = null) + * @method UnitReview|null findOneBy(array $criteria, array $orderBy = null) + * @method UnitReview[] findAll() + * @method UnitReview[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class UnitReviewRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, UnitReview::class); + } + +// /** +// * @return UnitReview[] Returns an array of UnitReview objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('u') +// ->andWhere('u.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('u.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?UnitReview +// { +// return $this->createQueryBuilder('u') +// ->andWhere('u.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Service/File/Uploader.php b/src/Service/File/Uploader.php index 23325d7..23536f5 100644 --- a/src/Service/File/Uploader.php +++ b/src/Service/File/Uploader.php @@ -5,6 +5,8 @@ use InvalidArgumentException; use League\Flysystem\Filesystem; use League\Flysystem\FilesystemOperator; +use League\Flysystem\MountManager; +// use League\Flysystem\Filesystem; use Symfony\Bridge\Twig\Extension\AssetExtension; use Symfony\Bridge\Twig\Extension\HttpFoundationExtension; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; @@ -14,6 +16,7 @@ use Symfony\Component\String\Slugger\SluggerInterface; use Symfony\Component\String\PathString; +// \Overblog\GraphQLBundle\Upload\Type\GraphQLUploadType::class; class Uploader implements UploaderInterface { @@ -31,7 +34,8 @@ public function __construct( // HttpFoundationExtension $httpHelper, SluggerInterface $slugger, // private Filesystem $filesystem, - private FilesystemOperator $defaultStorage, + private Filesystem $defaultStorage, + private MountManager $mountManager, private UrlGeneratorInterface $urlGenerator, // private Filesystem $filesystem, ) @@ -43,6 +47,8 @@ public function __construct( + // $this->defaultStorage->temporaryUrl() + // /** @AssetExtension */ // $assetsHelper = $container->get('twig.extension.assets'); @@ -73,14 +79,22 @@ public function upload(UploadedFile $file, string $path = '', ?string $newName = $uploadDir = $absoluteUploadDir; // $this->assetsHelper- + + $prefix = 'local://'; $uploadDir = ($uploadDir?? '') . '/' . $path; $filePath = $uploadDir . '/' .$newName; $filePath = preg_replace(['~/+~','~^/|/$~'],['/',''],$filePath); + $filePath = "{$prefix}".$filePath; + + $this->mountManager->write($filePath,$file->getContent()); + + // $mount = $this->defaultStorage-> - $this->defaultStorage->write($filePath,$file->getContent()); + // $filesystem = $this->mountManager-> + // $this->defaultStorage->write($filePath,$file->getContent()); // $this->filesystem->publicUrl(); diff --git a/symfony.lock b/symfony.lock index 5252738..d286205 100644 --- a/symfony.lock +++ b/symfony.lock @@ -22,6 +22,18 @@ "./src/Repository/.gitignore" ] }, + "doctrine/doctrine-fixtures-bundle": { + "version": "3.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.0", + "ref": "1f5514cfa15b947298df4d771e694e578d4c204d" + }, + "files": [ + "./src/DataFixtures/AppFixtures.php" + ] + }, "doctrine/doctrine-migrations-bundle": { "version": "3.2", "recipe": { @@ -72,6 +84,18 @@ "./config/packages/nelmio_cors.yaml" ] }, + "oneup/flysystem-bundle": { + "version": "4.9", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "4.0", + "ref": "3ae1b83985e89138f5443bbc2d9b8c074b497d49" + }, + "files": [ + "./config/packages/oneup_flysystem.yaml" + ] + }, "overblog/graphql-bundle": { "version": "1.0", "recipe": {