1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%friend_link}}".
- *
- * @property int $id ID
- * @property string $title 文本
- * @property string $url 链接
- * @property string $logo LOGO
- * @property int $is_image 1:图片链接 0:文字链接
- * @property int $type 分类
- * @property int $list_order 排序
- * @property int $disabled 1:禁用
- */
- class FriendLink extends \app\common\models\EActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%friend_link}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['title', 'url'], 'required'],
- [['is_image', 'type', 'list_order', 'disabled'], 'integer'],
- [['title'], 'string', 'max' => 30],
- [['url'], 'string', 'max' => 100],
- [['logo'], 'string', 'max' => 500],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => Yii::t('attr','friend_link.id'),
- 'title' => Yii::t('attr','friend_link.title'),
- 'url' => Yii::t('attr','friend_link.url'),
- 'logo' => Yii::t('attr','friend_link.logo'),
- 'is_image' => Yii::t('attr','friend_link.is_image'),
- 'type' => Yii::t('attr','friend_link.type'),
- 'list_order' => Yii::t('attr','friend_link.list_order'),
- 'disabled' => Yii::t('attr','friend_link.disabled'),
- ];
- }
- }
|