Files
TimeLog/app/Models/User.php
Darius Rapalis f512e1b080 Prompt: I am being prompted with organization creation modal on register page which is not correct, I should only see it after I log in, on the dashboard page
Session
Total cost:            $6.03 (costs may be inaccurate due to usage of unknown models)
Total duration (API):  54m 34s
Total duration (wall): 1h 19m 51s
Total code changes:    2980 lines added, 195 lines removed

Usage by model:
qwen/qwen3.6-35b-a3b:  324.5k input, 75.4k output, 12.8m cache read, 0 cache write ($5.96)
claude-haiku-4-5:  9.4k input, 13.3k output, 8.3k cache read, 0 cache write ($0.0767)

Runtime: llamacpp
Model: Qwen 3.6 35B A3B Q4 K M
Coding Agent: ClaudeCode
2026-04-29 11:24:36 +03:00

47 lines
1.3 KiB
PHP

<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
#[Fillable(['name', 'email', 'password', 'has_organization', 'current_organization_id'])]
#[Hidden(['password', 'remember_token'])]
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
public function organizations(): HasMany
{
return $this->hasMany(Organization::class);
}
public function currentOrganization(): BelongsTo
{
return $this->belongsTo(Organization::class, 'current_organization_id');
}
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'has_organization' => 'boolean',
'password' => 'hashed',
'current_organization_id' => 'integer',
];
}
}