芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/models/Payment.php
10], [['payment_method', 'payment_reference'], 'string', 'max' => 45], [['booking_id'], 'exist', 'skipOnError' => true, 'targetClass' => Booking::class, 'targetAttribute' => ['booking_id' => 'id']], [['customer_id'], 'exist', 'skipOnError' => true, 'targetClass' => Customer::class, 'targetAttribute' => ['customer_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'booking_id' => 'Booking ID', 'customer_id' => 'Customer ID', 'amount' => 'Amount', 'payment_method' => 'Payment Method', 'payment_reference' => 'Payment Reference', 'payment_date' => 'Payment Date', 'trash' => 'Trash', ]; } /** * Gets query for [[Booking]]. * * @return \yii\db\ActiveQuery */ public function getBooking() { return $this->hasOne(Booking::class, ['id' => 'booking_id']); } /** * Gets query for [[Customer]]. * * @return \yii\db\ActiveQuery */ public function getCustomer() { return $this->hasOne(Customer::class, ['id' => 'customer_id']); } }