Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Routing / RoutingRoute.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php
new file mode 100644 (file)
index 0000000..9e5d5d0
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Doctrine\Tests\Models\Routing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+
+/**
+ * @Entity
+ */
+class RoutingRoute
+{
+    /**
+     * @Id
+     * @GeneratedValue
+     * @column(type="integer")
+     */
+    public $id;
+
+    /**
+     * @ManyToMany(targetEntity="RoutingLeg", cascade={"all"})
+     * @JoinTable(name="RoutingRouteLegs",
+     *     joinColumns={@JoinColumn(name="route_id", referencedColumnName="id")},
+     *     inverseJoinColumns={@JoinColumn(name="leg_id", referencedColumnName="id", unique=true)}
+     * )
+     * @OrderBy({"departureDate" = "ASC"})
+     */
+    public $legs;
+
+    /**
+     * @OneToMany(targetEntity="RoutingRouteBooking", mappedBy="route")
+     * @OrderBy({"passengerName" = "ASC"})
+     */
+    public $bookings = array();
+
+    public function __construct()
+    {
+        $this->legs = new ArrayCollection();
+    }
+}
\ No newline at end of file