<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class WorkOrder extends Model
{
    protected $table = 'pc_wo';
    protected $primaryKey = 'woid';

    const UPDATED_AT = 'modified_date';
    const CREATED_AT = null;

    public function asset()
    {
        return $this->belongsTo('App\Asset', 'pcid');
    }

    public function notes()
    {
        return $this->hasMany('App\WorkOrderNote', 'woid');
    }

    public function store()
    {
        return $this->hasOne('App\Store', 'storeid');
    }
}
