| Current Path : /var/www/html/crm/models/ |
| Current File : /var/www/html/crm/models/Documents.php |
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "documents".
*
* @property int $id
* @property string $name
* @property string $type
* @property string $url
* @property string $created_dt
* @property int $created_by
* @property string $updated_dt
* @property int $updated_by
*/
class Documents extends \yii\db\ActiveRecord {
public $file;
/**
* {@inheritdoc}
*/
public static function tableName() {
return 'documents';
}
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['name', 'type'], 'required'],
[['created_by', 'updated_by'], 'integer'],
[['created_dt', 'updated_dt', 'uuid'], 'safe'],
[['name', 'type', 'url'], 'string', 'max' => 255],
[['file'], 'file'],
[['file'], 'required', 'on' => 'create'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels() {
return [
'id' => 'ID',
'name' => 'Document Name',
'type' => 'Type',
'url' => 'Upload Document',
'created_dt' => 'Created Dt',
'created_by' => 'Uploaded By',
'updated_dt' => 'Updated Dt',
'updated_by' => 'Updated By',
'file' => 'Upload Document',
];
}
}