fitness-web/common/models/Inventory.php

66 lines
1.3 KiB
PHP

<?php
namespace common\models;
use Yii;
use common\components\UserAwareBehavior;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "inventory".
*
* @property integer $id_inventory
* @property integer $id_user
* @property string $name
* @property string $created_at
* @property string $updated_at
*/
class Inventory extends \common\models\BaseFitnessActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'inventory';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name'], 'string']
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id_inventory' => Yii::t('common/inventory', 'Leltár azonosító'),
'name' => Yii::t('common/inventory', 'Megnevezés'),
'id_user' => Yii::t('common/inventory', 'Felhasználó'),
'created_at' => Yii::t('common/inventory', 'Létrehozás'),
'updated_at' => Yii::t('common/inventory', 'Módosítás'),
];
}
/**
* @inheritdoc
*/
public function behaviors()
{
return ArrayHelper::merge( [
[
'class' => UserAwareBehavior::className(),
]
], parent::behaviors());
}
}