芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/models/Booking.php
45], [['airline_id'], 'exist', 'skipOnError' => true, 'targetClass' => Airline::class, 'targetAttribute' => ['airline_id' => 'id']], [['customer_id'], 'exist', 'skipOnError' => true, 'targetClass' => Customer::class, 'targetAttribute' => ['customer_id' => 'id']], [['flight_id'], 'exist', 'skipOnError' => true, 'targetClass' => Flight::class, 'targetAttribute' => ['flight_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'flight_id' => 'Flight ID', 'customer_id' => 'Customer ID', 'airline_id' => 'Airline ID', 'total' => 'Total', 'code' => 'Code', 'status' => 'Status', 'date' => 'Date', 'created' => 'Created', 'updated' => 'Updated', 'active' => 'Active', 'trash' => 'Trash', ]; } /** * Gets query for [[Airline]]. * * @return \yii\db\ActiveQuery */ public function getAirline() { return $this->hasOne(Airline::class, ['id' => 'airline_id']); } /** * Gets query for [[BookingItems]]. * * @return \yii\db\ActiveQuery */ public function getBookingItems() { return $this->hasMany(BookingItems::class, ['booking_id' => 'id']); } /** * Gets query for [[Customer]]. * * @return \yii\db\ActiveQuery */ public function getCustomer() { return $this->hasOne(Customer::class, ['id' => 'customer_id']); } /** * Gets query for [[Flight]]. * * @return \yii\db\ActiveQuery */ public function getFlight() { return $this->hasOne(Flight::class, ['id' => 'flight_id']); } /** * Gets query for [[Payments]]. * * @return \yii\db\ActiveQuery */ public function getPayments() { return $this->hasMany(Payment::class, ['booking_id' => 'id']); } }