From f2e3b386c4febce1c98b98aef789da3df8172f93 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Rapha=C3=ABl=20Gertz?= <git@rapsys.eu>
Date: Tue, 4 Oct 2022 07:55:03 +0200
Subject: [PATCH] Add Country doctrine orm config

---
 Resources/config/doctrine/Country.orm.yml | 39 +++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Resources/config/doctrine/Country.orm.yml

diff --git a/Resources/config/doctrine/Country.orm.yml b/Resources/config/doctrine/Country.orm.yml
new file mode 100644
index 0000000..e0a5527
--- /dev/null
+++ b/Resources/config/doctrine/Country.orm.yml
@@ -0,0 +1,39 @@
+Rapsys\AirBundle\Entity\Country:
+    type: entity
+    #repositoryClass: Rapsys\AirBundle\Repository\CountryRepository
+    table: countries
+    id:
+        id:
+            type: integer
+            generator:
+                strategy: AUTO
+            options:
+                unsigned: true
+    fields:
+        code:
+            type: string
+            length: 2
+            nullable: false
+        alpha:
+            type: string
+            length: 3
+            nullable: false
+        title:
+            type: string
+            length: 64
+            nullable: false
+        created:
+            type: datetime
+        updated:
+            type: datetime
+    oneToMany:
+        users:
+            targetEntity: Rapsys\AirBundle\Entity\User
+            mappedBy: country
+    uniqueConstraints:
+        code:
+            columns: [ code ]
+        alpha:
+            columns: [ alpha ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']
-- 
2.41.3