<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Item extends Model
{
    protected $fillable = [
        'order_id',
        'code',
        'name',
        'price',
        'qty',
        'attributes'
    ];

    protected $casts = [
        'attributes' => 'array'
    ];

    public function order()
    {
        return $this->belongsTo('App\Order');
    }
}
