<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CompanyItems extends Model
{
    //
protected $table = 'company_items';

    protected $fillable = [
        'company_id',
        'name',
        'type',
        'weight',
        'price_per_gram',
        'manufacturing_cost',
        'total_price',
        'cashback',
        'resale_price',
        'unsealed_resale_price',
        'last_updated_at'
    ];

    protected $casts = [
        'last_updated_at' => 'datetime'
    ];

    public function company()
    {
        return $this->belongsTo(Company::class);
    }
}
