初始化仓库
This commit is contained in:
65
common/modelsgii/Nav.php
Normal file
65
common/modelsgii/Nav.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace common\modelsgii;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "yii_nav".
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $store_id
|
||||
* @property string $pic
|
||||
* @property string|null $external_link 外部链接
|
||||
* @property int $is_home 是否首页0否1是
|
||||
* @property string|null $home_time 推送时间,当is_home为0时是取消推送的时间
|
||||
* @property int $type 类型1首页轮播图
|
||||
* @property int $sort 排序
|
||||
* @property int $link_type 1内部2外部
|
||||
* @property int $created_at
|
||||
* @property int $updated_at
|
||||
* @property int $is_delete
|
||||
*/
|
||||
class Nav extends \common\core\BaseActiveRecord
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'yii_nav';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['pic'], 'required'],
|
||||
[['external_link'], 'string'],
|
||||
[['is_home', 'type', 'sort','created_at', 'updated_at', 'is_delete','link_type'], 'integer'],
|
||||
[['home_time'], 'safe'],
|
||||
[['pic'], 'string', 'max' => 500],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => 'ID',
|
||||
'pic' => 'Pic',
|
||||
'external_link' => 'External Link',
|
||||
'is_home' => 'Is Home',
|
||||
'home_time' => 'Home Time',
|
||||
'type' => 'Type',
|
||||
'sort' => 'Sort',
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
'is_delete' => 'Is Delete',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user