芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/models/Aircraft.php
45], [['model'], 'string', 'max' => 50], [['seat_map'], 'string', 'max' => 250], [['code'],'unique'], [['airline_id'], 'exist', 'skipOnError' => true, 'targetClass' => Airline::class, 'targetAttribute' => ['airline_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'airline_id' => 'Airline ID', 'name' => 'Name', 'code' => 'Code', 'unit_number' => 'Unit Number', 'model' => 'Model', 'capacity' => 'Capacity', 'seat_map' => 'Seat Map', 'seat_distribution' => 'Seat Distribution', '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 [[Flights]]. * * @return \yii\db\ActiveQuery */ public function getFlights() { return $this->hasMany(Flight::class, ['aircraft_id' => 'id']); } /** * Gets query for [[SeatClasses]]. * * @return \yii\db\ActiveQuery */ public function getSeatClasses() { return $this->hasMany(SeatClass::class, ['aircraft_id' => 'id']); } /** * Gets query for [[Seats]]. * * @return \yii\db\ActiveQuery */ public function getSeats() { return $this->hasMany(Seat::class, ['aircraft_id' => 'id']); } }