]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/config/doctrine/GoogleCalendar.orm.yml
Add google calendar entity
[airbundle] / Resources / config / doctrine / GoogleCalendar.orm.yml
diff --git a/Resources/config/doctrine/GoogleCalendar.orm.yml b/Resources/config/doctrine/GoogleCalendar.orm.yml
new file mode 100644 (file)
index 0000000..73ac000
--- /dev/null
@@ -0,0 +1,45 @@
+Rapsys\AirBundle\Entity\GoogleCalendar:
+    type: entity
+    #repositoryClass: Rapsys\AirBundle\Repository\GoogleCalendarRepository
+    table: google_calendars
+    id:
+        id:
+            type: integer
+            generator:
+                strategy: AUTO
+            options:
+                unsigned: true
+    fields:
+        mail:
+            type: string
+            length: 1024
+        summary:
+            type: string
+            length: 255
+#        description:
+#            type: string
+#            length: 200
+#        location:
+#            type: string
+#            length: 1024
+#        timezone:
+#            type: string
+#            length: 32
+        synchronized:
+            type: datetime
+            nullable: true
+        created:
+            type: datetime
+        updated:
+            type: datetime
+    manyToOne:
+        googleToken:
+            targetEntity: Rapsys\AirBundle\Entity\GoogleToken
+            inversedBy: googleCalendars
+            joinColumn:
+                nullable: false
+#    uniqueConstraints:
+#        user_mail:
+#            columns: [ user_id, mail ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']