<?php

namespace app\models;

use yii\db\ActiveRecord;

/**
 * This is the model class for table "Locations".
 *
 * @property integer $id
 * @property string $address
 * @property string $company_name
 * @property string $zipcode
 * @property string $email
 * @property string $phone
 * @property string $website
 * @property string $description
 * @property integer $preference
 * @property string $lat
 * @property string $lang
 * @property string $created_at
 * @property string $updated_at
 */
class Locations extends ActiveRecord {

    private $id;
    private $address;
    private $company_name;
    private $zipcode;
    private $email;
    private $phone;
    private $website;
    private $description;
    private $preference;
    private $lat;
    private $lang;
    private $created_at;
    private $updated_at;

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['email', 'company_name', 'address'], 'required'],
            [['description'], 'string'],
            [['created_at', 'updated_at'], 'safe'],
            [['zipcode', 'country','state', 'phone', 'website', 'preference'], 'string', 'max' => 256]
        ];
    }
}
