Fix Dutch model table names and seeder status values
- Add explicit $table property to all Eloquent models with Dutch names - Fix pivot table names in belongsToMany relationships - Fix seeder: use valid enum values for afhankelijkheden status Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ DB_DATABASE=innovatieplatform
|
|||||||
DB_USERNAME=innovatie
|
DB_USERNAME=innovatie
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
SESSION_DRIVER=database
|
SESSION_DRIVER=redis
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
SESSION_ENCRYPT=false
|
SESSION_ENCRYPT=false
|
||||||
SESSION_PATH=/
|
SESSION_PATH=/
|
||||||
@@ -35,9 +35,9 @@ SESSION_DOMAIN=null
|
|||||||
|
|
||||||
BROADCAST_CONNECTION=log
|
BROADCAST_CONNECTION=log
|
||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=redis
|
||||||
|
|
||||||
CACHE_STORE=database
|
CACHE_STORE=redis
|
||||||
# CACHE_PREFIX=
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
MEMCACHED_HOST=127.0.0.1
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|||||||
BIN
ai-service/app/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
ai-service/app/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
ai-service/app/__pycache__/main.cpython-312.pyc
Normal file
BIN
ai-service/app/__pycache__/main.cpython-312.pyc
Normal file
Binary file not shown.
@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class Actie extends Model
|
class Actie extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'acties';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'commitment_id',
|
'commitment_id',
|
||||||
'beschrijving',
|
'beschrijving',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class Afhankelijkheid extends Model
|
class Afhankelijkheid extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'afhankelijkheden';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'afhankelijk_van_project_id',
|
'afhankelijk_van_project_id',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class AuditLog extends Model
|
class AuditLog extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'audit_logs';
|
||||||
|
|
||||||
// Append-only: no updated_at
|
// Append-only: no updated_at
|
||||||
const UPDATED_AT = null;
|
const UPDATED_AT = null;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
|
|
||||||
class Budget extends Model
|
class Budget extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'budgets';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'bedrag',
|
'bedrag',
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
|
|
||||||
class Commitment extends Model
|
class Commitment extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'commitments';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'besluit_id',
|
'besluit_id',
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ class Document extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $table = 'documents';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'fase_id',
|
'fase_id',
|
||||||
@@ -46,6 +48,6 @@ class Document extends Model
|
|||||||
|
|
||||||
public function tags(): BelongsToMany
|
public function tags(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Tag::class);
|
return $this->belongsToMany(Tag::class, 'document_tag');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
|
|
||||||
class Fase extends Model
|
class Fase extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'fases';
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'type',
|
'type',
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ class Project extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $table = 'projects';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'speerpunt_id',
|
'speerpunt_id',
|
||||||
'naam',
|
'naam',
|
||||||
@@ -48,7 +50,7 @@ class Project extends Model
|
|||||||
|
|
||||||
public function teamleden(): BelongsToMany
|
public function teamleden(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class)
|
return $this->belongsToMany(User::class, 'project_user')
|
||||||
->withPivot('rol')
|
->withPivot('rol')
|
||||||
->withTimestamps()
|
->withTimestamps()
|
||||||
->using(ProjectUser::class);
|
->using(ProjectUser::class);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class Risico extends Model
|
class Risico extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'risicos';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'project_id',
|
'project_id',
|
||||||
'beschrijving',
|
'beschrijving',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class RoadmapItem extends Model
|
class RoadmapItem extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'roadmap_items';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'thema_id',
|
'thema_id',
|
||||||
'titel',
|
'titel',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|||||||
|
|
||||||
class Role extends Model
|
class Role extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'roles';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'naam',
|
'naam',
|
||||||
'beschrijving',
|
'beschrijving',
|
||||||
@@ -22,6 +24,6 @@ class Role extends Model
|
|||||||
|
|
||||||
public function users(): BelongsToMany
|
public function users(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class);
|
return $this->belongsToMany(User::class, 'role_user');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ class Speerpunt extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $table = 'speerpunten';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'thema_id',
|
'thema_id',
|
||||||
'naam',
|
'naam',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|||||||
|
|
||||||
class Tag extends Model
|
class Tag extends Model
|
||||||
{
|
{
|
||||||
|
protected $table = 'tags';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'naam',
|
'naam',
|
||||||
'categorie',
|
'categorie',
|
||||||
@@ -14,7 +16,7 @@ class Tag extends Model
|
|||||||
|
|
||||||
public function documents(): BelongsToMany
|
public function documents(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Document::class);
|
return $this->belongsToMany(Document::class, 'document_tag');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function kennisArtikelen(): BelongsToMany
|
public function kennisArtikelen(): BelongsToMany
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ class Thema extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $table = 'themas';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'naam',
|
'naam',
|
||||||
'beschrijving',
|
'beschrijving',
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ class User extends Authenticatable
|
|||||||
/** @use HasFactory<UserFactory> */
|
/** @use HasFactory<UserFactory> */
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasApiTokens, HasFactory, Notifiable;
|
||||||
|
|
||||||
|
protected $table = 'users';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
@@ -41,12 +43,12 @@ class User extends Authenticatable
|
|||||||
|
|
||||||
public function roles(): BelongsToMany
|
public function roles(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Role::class);
|
return $this->belongsToMany(Role::class, 'role_user');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function projects(): BelongsToMany
|
public function projects(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Project::class)
|
return $this->belongsToMany(Project::class, 'project_user')
|
||||||
->withPivot('rol')
|
->withPivot('rol')
|
||||||
->withTimestamps()
|
->withTimestamps()
|
||||||
->using(ProjectUser::class);
|
->using(ProjectUser::class);
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
'afhankelijk_van_project_id' => $p1->id,
|
'afhankelijk_van_project_id' => $p1->id,
|
||||||
'type' => 'data',
|
'type' => 'data',
|
||||||
'beschrijving' => 'Het AI-model heeft real-time sensordata nodig uit het LoRaWAN netwerk als input feature.',
|
'beschrijving' => 'Het AI-model heeft real-time sensordata nodig uit het LoRaWAN netwerk als input feature.',
|
||||||
'status' => 'actief',
|
'status' => 'open',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Digitale Tweeling is afhankelijk van AI Waterstandsmodel
|
// Digitale Tweeling is afhankelijk van AI Waterstandsmodel
|
||||||
@@ -500,7 +500,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
'afhankelijk_van_project_id' => $p8->id,
|
'afhankelijk_van_project_id' => $p8->id,
|
||||||
'type' => 'technisch',
|
'type' => 'technisch',
|
||||||
'beschrijving' => 'De digitale tweeling integreert de voorspellingsmodule van het AI waterstandsmodel.',
|
'beschrijving' => 'De digitale tweeling integreert de voorspellingsmodule van het AI waterstandsmodel.',
|
||||||
'status' => 'actief',
|
'status' => 'open',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Predictieve Gemaalbesturing is afhankelijk van AI Waterstandsmodel
|
// Predictieve Gemaalbesturing is afhankelijk van AI Waterstandsmodel
|
||||||
@@ -509,7 +509,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
'afhankelijk_van_project_id' => $p8->id,
|
'afhankelijk_van_project_id' => $p8->id,
|
||||||
'type' => 'technisch',
|
'type' => 'technisch',
|
||||||
'beschrijving' => 'De predictieve besturing gebruikt de 48-uurs waterstandsvoorspellingen als stuurinput.',
|
'beschrijving' => 'De predictieve besturing gebruikt de 48-uurs waterstandsvoorspellingen als stuurinput.',
|
||||||
'status' => 'actief',
|
'status' => 'open',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Remote Monitoring Waterkeringen is afhankelijk van LoRaWAN Sensornetwerk
|
// Remote Monitoring Waterkeringen is afhankelijk van LoRaWAN Sensornetwerk
|
||||||
@@ -518,7 +518,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
'afhankelijk_van_project_id' => $p1->id,
|
'afhankelijk_van_project_id' => $p1->id,
|
||||||
'type' => 'infrastructuur',
|
'type' => 'infrastructuur',
|
||||||
'beschrijving' => 'Het monitoring-project maakt gebruik van de LoRaWAN-infrastructuur voor datatransport.',
|
'beschrijving' => 'Het monitoring-project maakt gebruik van de LoRaWAN-infrastructuur voor datatransport.',
|
||||||
'status' => 'gepland',
|
'status' => 'open',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user