You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
5 years ago
|
<?php
|
||
|
|
||
|
namespace common\models;
|
||
|
|
||
|
use Yii;
|
||
|
|
||
|
/**
|
||
|
* This is the model class for table "fix_car_mateials".
|
||
|
*
|
||
|
* @property integer $id
|
||
|
* @property integer $store_room_id
|
||
|
* @property string $created_at
|
||
|
* @property string $updated_at
|
||
|
*
|
||
|
* @property StoreRoom $storeRoom
|
||
|
*/
|
||
|
class FixCarMateials extends \common\models\Base
|
||
|
{
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public static function tableName()
|
||
|
{
|
||
|
return 'fix_car_mateials';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
[['store_room_id'], 'integer'],
|
||
|
[['created_at', 'updated_at'], 'safe'],
|
||
|
[['store_room_id'], 'exist', 'skipOnError' => true, 'targetClass' => StoreRoom::className(), 'targetAttribute' => ['store_room_id' => 'id']],
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public function attributeLabels()
|
||
|
{
|
||
|
return [
|
||
|
'id' => 'ID',
|
||
|
'store_room_id' => 'Store Room ID',
|
||
|
'created_at' => 'Created At',
|
||
|
'updated_at' => 'Updated At',
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return \yii\db\ActiveQuery
|
||
|
*/
|
||
|
public function getStoreRoom()
|
||
|
{
|
||
|
return $this->hasOne(StoreRoom::className(), ['id' => 'store_room_id']);
|
||
|
}
|
||
|
}
|