<?php

namespace App\Models;

// use Illuminate\Support\Facades\Auth;
// use App\Scopes\OrganisationScope;

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

class Template extends Model
{
    use HasFactory;
    protected $table = 'template';
    protected $fillable = [
        'template_name',
        'prompt',
        'field_json',
        'is_tone',
        'organisation_id',
    ];

    // protected static function booted()
    // {
    //     static::addGlobalScope(new OrganisationScope);

    //     static::creating(function ($model) {
    //         if (Auth::check()) {
    //             $model->organisation_id = Auth::user()->organisation_id;
    //         }
    //     });
    // }

}
