1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php /** Created by Anton on 04.03.2020. */
- namespace app\models\entity;
- /**
- * This is the model class for table "tmc_storage".
- *
- * @property int $id
- * @property string $title
- * @property int $company
- * @property int $warehouse
- * @property int $stack
- * @property int $cell
- * @property int $tmc
- */
- class TmcStorage extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'tmc_storage';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['company', 'warehouse', 'stack', 'cell', 'tmc'], 'integer'],
- [['title'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'title' => 'Title',
- 'company' => 'Company ID',
- 'warehouse' => 'log ID',
- 'stack' => 'log ID',
- 'cell' => 'Cell ID',
- 'tmc' => 'Tmc ID',
- ];
- }
- /**
- * Возвращает устройство находящееся в ячейке
- *
- * @return Tmc|null
- */
- public function getTmc()
- {
- return Tmc::findOne($this->tmc);
- }
- }
|