<?php

namespace App\Models;

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

class survey_info extends Model
{
    use HasFactory;
	protected $fillable=['s_no','jilla_id','taluka_id','gram_id','location','landmark','maker_name','pole_num','road_width','road_confi','switch_point','pole_type','pole_other','pole_side','pole_height','pole_spacing','type_of_fixture','fixture_wattage','warranty_existing','Condition_existing','earth_condition','arms_clamps_required','dedicated_available','netword_issue_1','netword_issue_2','LED_wattage','remark','status','cable_user','types_of_arms','reducer_used','minimast_clamp_used','added_by','led_light_num','led_serial_num','led_series_with_make','approve_status','phase_no','request','move_data'];


public function jilla_details()
    {
        return $this->hasOne('App\Models\area_master','id','jilla_id');
    }
    public function taluka_details()
    {
        return $this->hasOne('App\Models\area_master','id','taluka_id');
    }
    public function gram_details()
    {
        return $this->hasOne('App\Models\area_master','id','gram_id');
    }
     public function gram()
    {
        return $this->belongsTo('App\Models\area_master','gram_id');
    }
     public function ccms_types()
    {
        return $this->hasOne('App\Models\ccms_types','gram_id','gram_id');
    }
      public function pole_details()
    {
        return $this->hasMany('App\Models\pole_details','pole_id','id');
    }

}

