Your IP : 216.73.216.79


Current Path : /var/www/html/crm/models/
Upload File :
Current File : /var/www/html/crm/models/Contact.php

<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "contact".
 *
 * @property double $id
 * @property string $uuid
 * @property string $type
 * @property int $data_id
 * @property string $name
 * @property string $email
 * @property string $phone
 * @property string $fax
 * @property string $created_dt
 * @property int $created_by
 * @property string $updated_dt
 * @property int $updated_by
 */
class Contact extends \yii\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'contact';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['uuid', 'name', 'phone'], 'required'],
            [['data_id', 'created_by', 'updated_by', 'phone', 'fax'], 'integer'],
            [['created_dt', 'updated_dt', 'position', 'email', 'office_no'], 'safe'],
            [['name', 'email'], 'string', 'max' => 255],
            [['type'], 'string', 'max' => 20],
            [['phone', 'fax'], 'string', 'max' => 50],
            [['email'], 'email'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'uuid' => 'Uuid',
            'type' => 'Contact Type',
            'data_id' => 'Data ID',
            'name' => 'Name',
            'email' => 'Email Address',
            'phone' => 'Mobile Phone',
            'fax' => 'Fax Number',
            'created_dt' => 'Created Dt',
            'created_by' => 'Created By',
            'updated_dt' => 'Updated Dt',
            'updated_by' => 'Updated By',
            'position' => 'Position',
            'office_no' => 'Office Number'
        ];
    }

}