<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Company extends Model
{
    use HasFactory;

    protected $table = 'tbl_company';
    protected $guarded = array();

    protected $casts = [
        'id' => 'integer',
        'user_id' => 'integer',
        'name' => 'string',
        'logo' => 'string',
        'country_code' => 'string',
        'mobile_number' => 'string',
        'address' => 'string',
        'area' => 'string',
        'city' => 'string',
        'state' => 'string',
        'country' => 'string',
        'pincode' => 'string',
        'latitude' => 'string',
        'longitude' => 'string',
        'activity' => 'string',
        'position' => 'string',
        'status' => 'integer',
    ];

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
