<?php

namespace {{ namespace }};

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use DateTimeInterface;

class {{ class }} extends Model {
    protected $connection = 'mysql';
    public $incrementing = false;
    protected $keyType = 'string';
    protected $fillable = ['id','created_at','updated_at'];

    public static function boot() {
        parent::boot();
        static::creating(function ($model) { $model->id = Str::uuid(); });
    }

    protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); }
}

