namespaces refactoring part 2

This commit is contained in:
Peter Papp
2021-07-18 18:05:33 +02:00
parent 8f77a497b5
commit 54dc57fcbf
107 changed files with 310 additions and 279 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Domain\Traffic\Models;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Traffic extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'upload',
'download',
];
public $incrementing = false;
protected $keyType = 'string';
/**
* Model events
*/
protected static function boot()
{
parent::boot();
static::creating(function ($model) {
$model->id = (string) Str::uuid();
});
}
}