<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SalesDetail extends Model
{
    //
	protected $guarded = ['id'];

    public function sale()
    {
        return $this->belongsTo("App\Models\Sales");
    }

    public function country()
    {
        return $this->belongsTo("App\Models\Country");
    }
    
    public function getGenderAttribute($value)
    {
        if($value==0) {
            return "男";
        } else {
            return "女";
        }
    }

}
