]> Raphaël G. Git Repositories - airbundle/commitdiff
Add google token entity
authorRaphaël Gertz <git@rapsys.eu>
Wed, 21 Feb 2024 11:10:29 +0000 (12:10 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 21 Feb 2024 11:10:29 +0000 (12:10 +0100)
Resources/config/doctrine/GoogleToken.orm.yml [new file with mode: 0644]

diff --git a/Resources/config/doctrine/GoogleToken.orm.yml b/Resources/config/doctrine/GoogleToken.orm.yml
new file mode 100644 (file)
index 0000000..07712e9
--- /dev/null
@@ -0,0 +1,43 @@
+Rapsys\AirBundle\Entity\GoogleToken:
+    type: entity
+    #repositoryClass: Rapsys\AirBundle\Repository\GoogleTokenRepository
+    table: google_tokens
+    id:
+        id:
+            type: integer
+            generator:
+                strategy: AUTO
+            options:
+                unsigned: true
+    fields:
+        mail:
+            type: string
+            length: 254
+        access:
+            type: string
+            length: 2048
+        refresh:
+            type: string
+            length: 512
+            nullable: true
+        expired:
+            type: datetime
+        created:
+            type: datetime
+        updated:
+            type: datetime
+    manyToOne:
+        user:
+            targetEntity: Rapsys\AirBundle\Entity\User
+            inversedBy: googleTokens
+            joinColumn:
+                nullable: false
+    oneToMany:
+        googleCalendars:
+            targetEntity: Rapsys\AirBundle\Entity\GoogleCalendar
+            mappedBy: googleToken
+    uniqueConstraints:
+        user_mail:
+            columns: [ user_id, mail ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']