| Current Path : /var/www/html/brspace/frontend/modules/filemanager/models/ |
| Current File : /var/www/html/brspace/frontend/modules/filemanager/models/FileManager.php |
<?php
namespace frontend\modules\filemanager\models;
use Yii;
/**
* This is the model class for table "file_manager".
*
* @property int $file_manager_id
* @property string|null $name
* @property string|null $file_name
* @property string|null $path
* @property string|null $path_alias
* @property int|null $parent
* @property string|null $extension
* @property string|null $description
* @property string|null $version
* @property int|null $type 1, folder, 2 file
* @property string|null $size
* @property int|null $created_by
* @property int|null $updated_by
* @property string|null $created_at
* @property string|null $updated_at
*/
class FileManager extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'file_manager';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['name', 'file_name', 'path', 'path_alias', 'parent', 'extension', 'description', 'version', 'type', 'size', 'created_by', 'updated_by', 'created_at', 'updated_at'], 'default', 'value' => null],
[['parent', 'type', 'created_by', 'updated_by'], 'integer'],
[['created_at', 'updated_at'], 'safe'],
[['name', 'file_name', 'path'], 'string', 'max' => 1000],
[['path_alias', 'extension', 'version', 'size'], 'string', 'max' => 50],
[['description'], 'string', 'max' => 2500],
[['path_alias'], 'unique'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'file_manager_id' => 'File Manager ID',
'name' => 'Name',
'file_name' => 'File Name',
'path' => 'Path',
'path_alias' => 'Path Alias',
'parent' => 'Parent',
'extension' => 'Extension',
'description' => 'Description',
'version' => 'Version',
'type' => 'Type',
'size' => 'Size',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
}