<?php

namespace app\models;

use Yii;

/**
 * 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 \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'Locations';
    }

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

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'address' => 'Address',
            'company_name' => 'Company Name',
            'zipcode' => 'Zipcode',
            'email' => 'Email',
            'phone' => 'Phone',
            'website' => 'Website',
            'description' => 'Description',
            'preference' => 'Preference',
            'lat' => 'Lat',
            'lang' => 'Lang',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
