Scaffold full project: Vue 3/Inertia frontend, Docker infra, domain model
- Frontend: Vue 3 + Inertia.js + Pinia + Tailwind CSS with layout and dashboard page - Infrastructure: Docker Compose with nginx, PHP-FPM, PostgreSQL+pgvector, Redis, Python AI service - Database: 22 migrations covering all domain entities (projects, phases, commitments, decisions, documents, handover, audit) - Models: 23 Eloquent models with relationships, casts, and 14 string-backed enums - AI service: FastAPI scaffold with health, chat, summarize, and search endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
55
app/Models/Overdrachtsplan.php
Normal file
55
app/Models/Overdrachtsplan.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\OverdrachtsStatus;
|
||||
use App\Enums\OverdrachtsType;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Overdrachtsplan extends Model
|
||||
{
|
||||
protected $table = 'overdrachtsplannen';
|
||||
|
||||
protected $fillable = [
|
||||
'project_id',
|
||||
'type',
|
||||
'status',
|
||||
'eigenaar_rnd_id',
|
||||
'eigenaar_ontvanger_id',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'type' => OverdrachtsType::class,
|
||||
'status' => OverdrachtsStatus::class,
|
||||
];
|
||||
}
|
||||
|
||||
public function project(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Project::class);
|
||||
}
|
||||
|
||||
public function eigenaarRnd(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'eigenaar_rnd_id');
|
||||
}
|
||||
|
||||
public function eigenaarOntvanger(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'eigenaar_ontvanger_id');
|
||||
}
|
||||
|
||||
public function criteria(): HasMany
|
||||
{
|
||||
return $this->hasMany(Criterium::class);
|
||||
}
|
||||
|
||||
public function acceptaties(): HasMany
|
||||
{
|
||||
return $this->hasMany(Acceptatie::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user