<?php

namespace App\Models;

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

class Customer extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $guarded = [];

    protected $fillable = [
        'name',
        'phone',
        'whatsapp',
        'email',
        'address',
        'photo',
        'first_mony'
    ];

    public function monyImports()
    {
        return $this->hasMany(MonyImport::class);
    }

    public function monyExports()
    {
        return $this->hasMany(MonyExport::class);
    }

    public function sales()
    {
        return $this->hasMany(Sale::class);
    }

    public function purchases()
    {
        return $this->hasMany(Purchase::class);
    }
}
