to squeeze

This commit is contained in:
Clément
2025-06-03 14:10:35 +02:00
parent ea0884d39f
commit 2c4aeb4704
83 changed files with 1566 additions and 69 deletions

View File

@@ -1,12 +1,57 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Billet
*
* @property int $id
* @property Carbon $BIL_DATE
* @property string $BIL_TITRE
* @property string $BIL_CONTENU
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Collection|BilletCategorie[] $billet_categories
* @property Collection|Commentaire[] $commentaires
*
* @package App\Models
*/
class Billet extends Model
{
/** @use HasFactory<\Database\Factories\BilletFactory> */
use HasFactory;
protected $table = 'billets';
protected $casts = [
'BIL_DATE' => 'datetime'
];
protected $fillable = [
'BIL_DATE',
'BIL_TITRE',
'BIL_CONTENU'
];
protected $hidden = [
'id',
'created_at',
'updated_at'
];
public function billet_categories()
{
return $this->hasMany(BilletCategorie::class);
}
public function commentaires()
{
return $this->hasMany(Commentaire::class);
}
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class BilletCategorie
*
* @property int $id
* @property int $billet_id
* @property int $categorie_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Billet $billet
* @property Category $category
*
* @package App\Models
*/
class BilletCategorie extends Model
{
protected $table = 'billet_categorie';
protected $casts = [
'billet_id' => 'int',
'categorie_id' => 'int'
];
protected $fillable = [
'billet_id',
'categorie_id'
];
public function billet()
{
return $this->belongsTo(Billet::class);
}
public function category()
{
return $this->belongsTo(Category::class, 'categorie_id');
}
}

35
laravel/app/Models/Cache.php Executable file
View File

@@ -0,0 +1,35 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Cache
*
* @property string $key
* @property string $value
* @property int $expiration
*
* @package App\Models
*/
class Cache extends Model
{
protected $table = 'cache';
protected $primaryKey = 'key';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'expiration' => 'int'
];
protected $fillable = [
'value',
'expiration'
];
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class CacheLock
*
* @property string $key
* @property string $owner
* @property int $expiration
*
* @package App\Models
*/
class CacheLock extends Model
{
protected $table = 'cache_locks';
protected $primaryKey = 'key';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'expiration' => 'int'
];
protected $fillable = [
'owner',
'expiration'
];
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Category
*
* @property int $id
* @property string $CAT_NOM
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Collection|BilletCategorie[] $billet_categories
*
* @package App\Models
*/
class Category extends Model
{
protected $table = 'categories';
protected $fillable = [
'CAT_NOM'
];
public function billet_categories()
{
return $this->hasMany(BilletCategorie::class, 'categorie_id');
}
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Commentaire
*
* @property int $id
* @property Carbon $COM_DATE
* @property string $COM_AUTEUR
* @property string $COM_CONTENU
* @property int $billet_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Billet $billet
*
* @package App\Models
*/
class Commentaire extends Model
{
protected $table = 'commentaires';
protected $casts = [
'COM_DATE' => 'datetime',
'billet_id' => 'int'
];
protected $fillable = [
'COM_DATE',
'COM_AUTEUR',
'COM_CONTENU',
'billet_id'
];
protected $hidden = [
'id',
'created_at',
'updated_at',
'billet_id'
];
public function billet()
{
return $this->belongsTo(Billet::class);
}
}

42
laravel/app/Models/Job.php Executable file
View File

@@ -0,0 +1,42 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Job
*
* @property int $id
* @property string $queue
* @property string $payload
* @property int $attempts
* @property int|null $reserved_at
* @property int $available_at
* @property int $created_at
*
* @package App\Models
*/
class Job extends Model
{
protected $table = 'jobs';
public $timestamps = false;
protected $casts = [
'attempts' => 'int',
'reserved_at' => 'int',
'available_at' => 'int'
];
protected $fillable = [
'queue',
'payload',
'attempts',
'reserved_at',
'available_at'
];
}

51
laravel/app/Models/JobBatch.php Executable file
View File

@@ -0,0 +1,51 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class JobBatch
*
* @property string $id
* @property string $name
* @property int $total_jobs
* @property int $pending_jobs
* @property int $failed_jobs
* @property string $failed_job_ids
* @property string|null $options
* @property int|null $cancelled_at
* @property int $created_at
* @property int|null $finished_at
*
* @package App\Models
*/
class JobBatch extends Model
{
protected $table = 'job_batches';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'total_jobs' => 'int',
'pending_jobs' => 'int',
'failed_jobs' => 'int',
'cancelled_at' => 'int',
'finished_at' => 'int'
];
protected $fillable = [
'name',
'total_jobs',
'pending_jobs',
'failed_jobs',
'failed_job_ids',
'options',
'cancelled_at',
'finished_at'
];
}

41
laravel/app/Models/Session.php Executable file
View File

@@ -0,0 +1,41 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Session
*
* @property string $id
* @property int|null $user_id
* @property string|null $ip_address
* @property string|null $user_agent
* @property string $payload
* @property int $last_activity
*
* @package App\Models
*/
class Session extends Model
{
protected $table = 'sessions';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'user_id' => 'int',
'last_activity' => 'int'
];
protected $fillable = [
'user_id',
'ip_address',
'user_agent',
'payload',
'last_activity'
];
}

74
laravel/app/Models/User.php Normal file → Executable file
View File

@@ -1,48 +1,46 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
class User extends Authenticatable
/**
* Class User
*
* @property int $id
* @property string $name
* @property string $email
* @property Carbon|null $email_verified_at
* @property string $password
* @property string|null $remember_token
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @package App\Models
*/
class User extends Model
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
protected $casts = [
'email_verified_at' => 'datetime'
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
protected $hidden = [
'password',
'remember_token'
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
protected $fillable = [
'name',
'email',
'email_verified_at',
'password',
'remember_token'
];
}