芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/models/Seat.php
10], [['position'], 'string', 'max' => 20], [['row', 'map_x', 'map_y'], 'string', 'max' => 45], [['aircraft_id'], 'exist', 'skipOnError' => true, 'targetClass' => Aircraft::class, 'targetAttribute' => ['aircraft_id' => 'id']], [['airline_id'], 'exist', 'skipOnError' => true, 'targetClass' => Airline::class, 'targetAttribute' => ['airline_id' => 'id']], [['seat_class_id'], 'exist', 'skipOnError' => true, 'targetClass' => SeatClass::class, 'targetAttribute' => ['seat_class_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'aircraft_id' => 'Aircraft ID', 'seat_class_id' => 'Seat Class ID', 'airline_id' => 'Airline ID', 'seat_number' => 'Seat Number', 'position' => 'Position', 'row' => 'Row', 'map_x' => 'Map X', 'map_y' => 'Map Y', 'seat_class' => 'Seat Class', 'created' => 'Created', 'updated' => 'Updated', 'active' => 'Active', 'trash' => 'Trash', ]; } /** * Gets query for [[Aircraft]]. * * @return \yii\db\ActiveQuery */ public function getAircraft() { return $this->hasOne(Aircraft::class, ['id' => 'aircraft_id']); } /** * 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(BookingItem::class, ['seat_id' => 'id']); } /** * Gets query for [[SeatClass]]. * * @return \yii\db\ActiveQuery */ public function getSeatClass() { return $this->hasOne(SeatClass::class, ['id' => 'seat_class_id']); } }