first commit

This commit is contained in:
2023-05-06 20:40:02 +03:00
commit fdf3e1e602
221 changed files with 12262 additions and 0 deletions

47
common/models/News.php Executable file
View File

@ -0,0 +1,47 @@
<?php
namespace common\models;
/**
* This is the model class for table "news".
*
* @property int $id
* @property string|null $title
* @property string|null $text
* @property string|null $slug
*/
class News extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'news';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['text'], 'string'],
[['title', 'slug'], 'string', 'max' => 255],
[['slug'], 'unique'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'title' => 'Title',
'text' => 'Text',
'slug' => 'Slug',
];
}
}