Your IP : 216.73.216.79


Current Path : /var/www/html/project/models/
Upload File :
Current File : /var/www/html/project/models/Documents.php

<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "documents".
 *
 * @property int $id
 * @property int $project_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'],
            [['project_id', 'created_by', 'updated_by'], 'integer'],
            [['created_dt', 'updated_dt'], 'safe'],
            [['name', 'type', 'url'], 'string', 'max' => 255],
            [['file'], 'file'],
            [['file'], 'required', 'on' => 'create'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'project_id' => 'Project',
            'name' => 'Document Name',
            'type' => 'Type',
            'url' => 'Upload Document',
            'created_dt' => 'Created Dt',
            'created_by' => 'Created By',
            'updated_dt' => 'Updated Dt',
            'updated_by' => 'Updated By',
            'file' => 'Upload Document',
        ];
    }

}