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.
 
 
 
 
simple-yewu/common/models/Brand2T.php

59 lines
1.1 KiB

<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "brand2_t".
*
* @property integer $id
* @property string $name
* @property string $created_at
* @property string $updated_at
*/
class Brand2T extends \common\models\Base
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'brand2_t';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name'], 'required'],
[['created_at', 'updated_at'], 'safe'],
[['name'], 'string', 'max' => 100],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'name' => 'Name',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
public function getFactories()
{
return $this->hasMany(FactoryT::className(),['brand_id'=>'id']);
}
public function getSeries()
{
return $this->hasMany(Series2T::className(),['brand_id'=>'id']);
}
}