diff --git a/composer.json b/composer.json index b65f8a8..9f2895f 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ "doctrine/dbal": "^2.6", "doctrine/doctrine-bundle": "^1.8", "doctrine/orm": "^2.6", + "ramsey/uuid-doctrine": "^1.4", "symfony/console": "^4.0", "symfony/flex": "^1.0", "symfony/framework-bundle": "^4.0", diff --git a/composer.lock b/composer.lock index 4d5c7f4..186d91d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "6ddfd2d9adacc6e6d8b6e715d904c7ab", + "content-hash": "3b3d990426e3e72fcc6d8810e9c49aee", "packages": [ { "name": "doctrine/annotations", @@ -976,27 +976,27 @@ }, { "name": "ocramius/package-versions", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "ad8a245decad4897cc6b432743913dad0d69753c" + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/ad8a245decad4897cc6b432743913dad0d69753c", - "reference": "ad8a245decad4897cc6b432743913dad0d69753c", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f", + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0", - "php": "~7.0" + "composer-plugin-api": "^1.0.0", + "php": "^7.1.0" }, "require-dev": { - "composer/composer": "^1.3", + "composer/composer": "^1.6.3", "ext-zip": "*", - "humbug/humbug": "dev-master", - "phpunit/phpunit": "^6.4" + "infection/infection": "^0.7.1", + "phpunit/phpunit": "^7.0.0" }, "type": "composer-plugin", "extra": { @@ -1021,7 +1021,7 @@ } ], "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "time": "2017-11-24T11:07:03+00:00" + "time": "2018-02-05T13:05:30+00:00" }, { "name": "ocramius/proxy-manager", @@ -1092,6 +1092,54 @@ ], "time": "2017-05-04T11:12:50+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v2.0.11", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-09-27T21:40:39+00:00" + }, { "name": "psr/cache", "version": "1.0.1", @@ -1282,18 +1330,154 @@ ], "time": "2017-01-02T13:31:39+00:00" }, + { + "name": "ramsey/uuid", + "version": "3.7.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": "^5.4 || ^7.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.9", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2018-01-20T00:28:24+00:00" + }, + { + "name": "ramsey/uuid-doctrine", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid-doctrine.git", + "reference": "224a55a2605a33a484bdfa4bd209e5bf9ec35e3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid-doctrine/zipball/224a55a2605a33a484bdfa4bd209e5bf9ec35e3c", + "reference": "224a55a2605a33a484bdfa4bd209e5bf9ec35e3c", + "shasum": "" + }, + "require": { + "doctrine/orm": "^2.5", + "php": "^5.4 || ^7.0", + "ramsey/uuid": "^3.0" + }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "^0.9.0", + "phpunit/phpunit": "^4.7 || ^5.0", + "satooshi/php-coveralls": "^0.6.1", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\Doctrine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "http://benramsey.com" + } + ], + "description": "Allow the use of a ramsey/uuid UUID as Doctrine field type.", + "homepage": "https://github.com/ramsey/uuid-doctrine", + "keywords": [ + "doctrine", + "guid", + "identifier", + "uuid" + ], + "time": "2017-11-07T22:09:45+00:00" + }, { "name": "symfony/cache", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "1ebe207de664355b1699d35b12b0563c38a47b4e" + "reference": "e901ff335ef5e8ef57ee9b8e098bd54a1d39a857" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/1ebe207de664355b1699d35b12b0563c38a47b4e", - "reference": "1ebe207de664355b1699d35b12b0563c38a47b4e", + "url": "https://api.github.com/repos/symfony/cache/zipball/e901ff335ef5e8ef57ee9b8e098bd54a1d39a857", + "reference": "e901ff335ef5e8ef57ee9b8e098bd54a1d39a857", "shasum": "" }, "require": { @@ -1349,20 +1533,20 @@ "caching", "psr6" ], - "time": "2018-01-03T17:15:19+00:00" + "time": "2018-01-18T22:19:33+00:00" }, { "name": "symfony/config", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "0e86d267db0851cf55f339c97df00d693fe8592f" + "reference": "ecd917899167922086ddb3247aa43eb1c418fcb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/0e86d267db0851cf55f339c97df00d693fe8592f", - "reference": "0e86d267db0851cf55f339c97df00d693fe8592f", + "url": "https://api.github.com/repos/symfony/config/zipball/ecd917899167922086ddb3247aa43eb1c418fcb2", + "reference": "ecd917899167922086ddb3247aa43eb1c418fcb2", "shasum": "" }, "require": { @@ -1409,20 +1593,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2018-01-21T19:06:11+00:00" }, { "name": "symfony/console", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e" + "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", - "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", + "url": "https://api.github.com/repos/symfony/console/zipball/36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", + "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", "shasum": "" }, "require": { @@ -1477,20 +1661,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2018-01-29T09:06:29+00:00" }, { "name": "symfony/debug", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "9ae4223a661b56a9abdce144de4886cca37f198f" + "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/9ae4223a661b56a9abdce144de4886cca37f198f", - "reference": "9ae4223a661b56a9abdce144de4886cca37f198f", + "url": "https://api.github.com/repos/symfony/debug/zipball/c77bb31d0f6310a2ac11e657475d396a92e5dc54", + "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54", "shasum": "" }, "require": { @@ -1533,20 +1717,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-01-03T17:15:19+00:00" + "time": "2018-01-18T22:19:33+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "67bf5e4f4da85624f30a5e43b7f43225c8b71959" + "reference": "f78ca49c6360c710ca8e316511e71a23b10e3bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/67bf5e4f4da85624f30a5e43b7f43225c8b71959", - "reference": "67bf5e4f4da85624f30a5e43b7f43225c8b71959", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f78ca49c6360c710ca8e316511e71a23b10e3bf2", + "reference": "f78ca49c6360c710ca8e316511e71a23b10e3bf2", "shasum": "" }, "require": { @@ -1604,11 +1788,11 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-01-04T15:52:56+00:00" + "time": "2018-01-29T09:29:16+00:00" }, { "name": "symfony/doctrine-bridge", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", @@ -1687,7 +1871,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1750,7 +1934,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -1799,7 +1983,7 @@ }, { "name": "symfony/finder", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1848,24 +2032,24 @@ }, { "name": "symfony/flex", - "version": "v1.0.61", + "version": "v1.0.68", "source": { "type": "git", "url": "https://github.com/symfony/flex.git", - "reference": "f872f8faccf5ff95678e1e428f460a333ba1e5d0" + "reference": "0241b2acbb58df29e633b03fb56eb349a207613f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/f872f8faccf5ff95678e1e428f460a333ba1e5d0", - "reference": "f872f8faccf5ff95678e1e428f460a333ba1e5d0", + "url": "https://api.github.com/repos/symfony/flex/zipball/0241b2acbb58df29e633b03fb56eb349a207613f", + "reference": "0241b2acbb58df29e633b03fb56eb349a207613f", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1", + "composer-plugin-api": "^1.0", "php": "^7.0" }, "require-dev": { - "composer/composer": "^1.4", + "composer/composer": "^1.0.2", "symfony/phpunit-bridge": "^3.2.8" }, "type": "composer-plugin", @@ -1890,20 +2074,20 @@ "email": "fabien.potencier@gmail.com" } ], - "time": "2018-01-12T13:09:44+00:00" + "time": "2018-01-31T19:34:57+00:00" }, { "name": "symfony/framework-bundle", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "7d80f8dcebce598b03dfe75a8669d8a1942687cd" + "reference": "3766b9b88e9918f68560b58a404340b41112b861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/7d80f8dcebce598b03dfe75a8669d8a1942687cd", - "reference": "7d80f8dcebce598b03dfe75a8669d8a1942687cd", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/3766b9b88e9918f68560b58a404340b41112b861", + "reference": "3766b9b88e9918f68560b58a404340b41112b861", "shasum": "" }, "require": { @@ -2004,20 +2188,20 @@ ], "description": "Symfony FrameworkBundle", "homepage": "https://symfony.com", - "time": "2018-01-04T15:52:56+00:00" + "time": "2018-01-29T09:06:29+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "03fe5171e35966f43453e2e5c15d7fe65f7fb23b" + "reference": "82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/03fe5171e35966f43453e2e5c15d7fe65f7fb23b", - "reference": "03fe5171e35966f43453e2e5c15d7fe65f7fb23b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4", + "reference": "82a3ee2c6662d08ca1adf99e1ef2e31ab48196d4", "shasum": "" }, "require": { @@ -2057,20 +2241,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-01-03T17:15:19+00:00" + "time": "2018-01-29T09:06:29+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f707ed09d3b5799a26c985de480d48b48540d41a" + "reference": "194bd224ec27952eac6d4fea6264b22990834eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f707ed09d3b5799a26c985de480d48b48540d41a", - "reference": "f707ed09d3b5799a26c985de480d48b48540d41a", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/194bd224ec27952eac6d4fea6264b22990834eca", + "reference": "194bd224ec27952eac6d4fea6264b22990834eca", "shasum": "" }, "require": { @@ -2078,7 +2262,7 @@ "psr/log": "~1.0", "symfony/debug": "~3.4|~4.0", "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0" + "symfony/http-foundation": "~3.4.4|~4.0.4" }, "conflict": { "symfony/config": "<3.4", @@ -2143,7 +2327,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-01-05T08:54:25+00:00" + "time": "2018-01-29T13:27:08+00:00" }, { "name": "symfony/lts", @@ -2324,16 +2508,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@ -2345,7 +2529,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -2379,20 +2563,20 @@ "portable", "shim" ], - "time": "2017-10-11T12:05:26+00:00" + "time": "2018-01-30T19:27:44+00:00" }, { "name": "symfony/routing", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a34b58ed26cc090f99b2ef833d609a6884581b3c" + "reference": "a69bd948700b672e036147762f46749bcae33796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a34b58ed26cc090f99b2ef833d609a6884581b3c", - "reference": "a34b58ed26cc090f99b2ef833d609a6884581b3c", + "url": "https://api.github.com/repos/symfony/routing/zipball/a69bd948700b672e036147762f46749bcae33796", + "reference": "a69bd948700b672e036147762f46749bcae33796", "shasum": "" }, "require": { @@ -2457,20 +2641,20 @@ "uri", "url" ], - "time": "2018-01-04T15:52:56+00:00" + "time": "2018-01-16T18:04:12+00:00" }, { "name": "symfony/yaml", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee" + "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b84f646b9490d2101e2c25ddeec77ceefbda2eee", - "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ffc60bda1d4a00ec0b32eeabf39dc017bf480028", + "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028", "shasum": "" }, "require": { @@ -2515,7 +2699,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2018-01-21T19:06:11+00:00" }, { "name": "zendframework/zend-code", @@ -2628,7 +2812,7 @@ "packages-dev": [ { "name": "symfony/dotenv", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index ac8aba0..26d2579 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -10,6 +10,8 @@ doctrine: # With Symfony 3.3, remove the `resolve:` prefix url: '%env(resolve:DATABASE_URL)%' + types: + uuid: Ramsey\Uuid\Doctrine\UuidType orm: auto_generate_proxy_classes: '%kernel.debug%' naming_strategy: doctrine.orm.naming_strategy.underscore diff --git a/src/Entity/Event.php b/src/Entity/Event.php new file mode 100644 index 0000000..1fd7769 --- /dev/null +++ b/src/Entity/Event.php @@ -0,0 +1,67 @@ +id = Uuid::uuid4(); + $this->title = $title; + $this->eventType = $eventType; + } + + public function getId(): UuidInterface { + return $this->id; + } + + public function getTitle(): string { + return $this->title; + } + + public function setTitle(string $title): void { + $this->title = $title; + } + + public function getEventType(): EventType { + return $this->eventType; + } + + public function setEventType(EventType $eventType): void { + $this->eventType = $eventType; + } +} diff --git a/src/Entity/EventType.php b/src/Entity/EventType.php new file mode 100644 index 0000000..ceba819 --- /dev/null +++ b/src/Entity/EventType.php @@ -0,0 +1,56 @@ +name = $name; + $this->comment = $comment; + } + + public function getId(): int { + return $this->id; + } + + public function getName(): string { + return $this->name; + } + + public function setName(string $name): void { + $this->name = $name; + } + + public function getComment(): ?string { + return $this->comment; + } + + public function setComment(?string $comment): void { + $this->comment = $comment; + } +} diff --git a/src/Entity/SubEvent.php b/src/Entity/SubEvent.php new file mode 100644 index 0000000..37a587b --- /dev/null +++ b/src/Entity/SubEvent.php @@ -0,0 +1,112 @@ +id = Uuid::uuid4(); + } + + /** + * @var \DateTime + * + * @ORM\Column(type="datetimetz") + */ + protected $endDate; + + public function __construct(Event $parent, string $title, string $description, \DateTime $startDate, \DateTime $endDate) { + $this->id = Uuid::uuid4(); + $this->parent = $parent; + $this->title = $title; + $this->description = $description; + $this->startDate = $startDate; + $this->endDate = $endDate; + } + + public function getId(): UuidInterface { + return $this->id; + } + + public function getParent(): Event { + return $this->parent; + } + + public function setParent(Event $parent): void { + $this->parent = $parent; + } + + public function getTitle(): string { + return $this->title; + } + + public function setTitle(string $title): void { + $this->title = $title; + } + + public function getDescription(): string { + return $this->description; + } + + public function setDescription(string $description): void { + $this->description = $description; + } + + public function getStartDate(): \DateTime { + return $this->startDate; + } + + public function setStartDate(\DateTime $startDate): void { + $this->startDate = $startDate; + } + + public function getEndDate(): \DateTime { + return $this->endDate; + } + + public function setEndDate(\DateTime $endDate): void { + $this->endDate = $endDate; + } +} diff --git a/symfony.lock b/symfony.lock index 5dc50b3..6c4e946 100644 --- a/symfony.lock +++ b/symfony.lock @@ -65,6 +65,9 @@ "ocramius/proxy-manager": { "version": "2.1.1" }, + "paragonie/random_compat": { + "version": "v2.0.11" + }, "psr/cache": { "version": "1.0.1" }, @@ -77,6 +80,18 @@ "psr/simple-cache": { "version": "1.0.0" }, + "ramsey/uuid": { + "version": "3.7.3" + }, + "ramsey/uuid-doctrine": { + "version": "1.3", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "master", + "version": "1.3", + "ref": "f7895777cd673fcefbc321a9063077a24e5df646" + } + }, "symfony/cache": { "version": "v4.0.3" },