First commit

This commit is contained in:
dyzulk
2025-12-30 12:11:01 +07:00
commit f68f34980a
150 changed files with 22717 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SocialAccount extends Model
{
protected $primaryKey = 'id';
protected $keyType = 'string';
public $incrementing = false;
protected static function booted()
{
static::creating(function ($model) {
if (empty($model->id)) {
$model->id = \App\Helpers\UuidHelper::generate();
}
});
}
protected $fillable = [
'user_id',
'provider',
'provider_id',
'provider_email',
'avatar',
'token',
'refresh_token',
'expires_at',
];
protected $casts = [
'expires_at' => 'datetime',
];
public function user()
{
return $this->belongsTo(User::class);
}
}