feat(accounts): fresh accounts implementation

This commit is contained in:
Darko Gjorgjijoski
2026-08-20 23:48:22 +02:00
parent 973fda1df6
commit d5dc446b24
42 changed files with 3768 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Domains\Accounts\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* One preference belonging to a staff account.
*
* The store mirrors the company one, addressed by a `key` column instead of an
* `option` column. The sentinel value "default" on the `language` key means
* "follow the company", so promoting a member never freezes a copy of the
* inviter's language.
*/
class UserSetting extends Model
{
use HasFactory;
protected $table = 'user_settings';
protected $guarded = ['id'];
/**
* Account this preference belongs to.
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}