This commit is contained in:
2026-08-15 13:29:00 -07:00
parent 649feeba63
commit 793dc85e44
70 changed files with 12639 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Airline
*
* @property int $id
* @property string $name
* @property string $code
* @property int $file_id
* @property int $status
* @property Carbon $created_at
*
* @property Collection|Flight[] $flights
*
* @package App\Models
*/
class Airline extends Model
{
protected $table = 'airlines';
public $timestamps = false;
protected $casts = [
'file_id' => 'int',
'status' => 'int'
];
protected $fillable = [
'name',
'code',
'file_id',
'status'
];
public function flights()
{
return $this->hasMany(Flight::class);
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Airport
*
* @property int $id
* @property string $name
* @property string $city
* @property string $country
* @property string $code
*
* @property Collection|Flight[] $flights
*
* @package App\Models
*/
class Airport extends Model
{
protected $table = 'airports';
public $timestamps = false;
protected $fillable = [
'name',
'city',
'country',
'code'
];
public function flights()
{
return $this->hasMany(Flight::class, 'departure_airport_id');
}
}
+75
View File
@@ -0,0 +1,75 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Booking
*
* @property int $id
* @property int $user_id
* @property int $flight_id
* @property int $toure_date_id
* @property int $adult_count
* @property int $child_count
* @property int $total_price
* @property string $tracking_code
* @property int $status
* @property Carbon $created_ar
* @property Carbon $updated_at
*
* @property Flight $flight
* @property TourDate $tour_date
* @property User $user
*
* @package App\Models
*/
class Booking extends Model
{
protected $table = 'bookings';
public $timestamps = false;
protected $casts = [
'user_id' => 'int',
'flight_id' => 'int',
'toure_date_id' => 'int',
'adult_count' => 'int',
'child_count' => 'int',
'total_price' => 'int',
'status' => 'int',
'created_ar' => 'datetime'
];
protected $fillable = [
'user_id',
'flight_id',
'toure_date_id',
'adult_count',
'child_count',
'total_price',
'tracking_code',
'status',
'created_ar'
];
public function flight()
{
return $this->belongsTo(Flight::class);
}
public function tour_date()
{
return $this->belongsTo(TourDate::class, 'toure_date_id');
}
public function user()
{
return $this->belongsTo(User::class);
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class BookingPassenger
*
* @property int $id
* @property int $booking_id
* @property string $first_name
* @property string $last_name
* @property string $national_code
* @property Carbon $birth_date
* @property int $passenger_type
* @property Carbon $created_ar
* @property Carbon $updated_at
*
* @package App\Models
*/
class BookingPassenger extends Model
{
protected $table = 'booking_passengers';
public $timestamps = false;
protected $casts = [
'booking_id' => 'int',
'birth_date' => 'datetime',
'passenger_type' => 'int',
'created_ar' => 'datetime'
];
protected $fillable = [
'booking_id',
'first_name',
'last_name',
'national_code',
'birth_date',
'passenger_type',
'created_ar'
];
}
+45
View File
@@ -0,0 +1,45 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Comment
*
* @property int $id
* @property int $user_id
* @property string $comment
* @property int $status
* @property Carbon $created_at
*
* @property User $user
*
* @package App\Models
*/
class Comment extends Model
{
protected $table = 'comments';
public $timestamps = false;
protected $casts = [
'user_id' => 'int',
'status' => 'int'
];
protected $fillable = [
'user_id',
'comment',
'status'
];
public function user()
{
return $this->belongsTo(User::class);
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class File
*
* @property int $id
* @property string $name
* @property string $extension
* @property int $size
* @property string $original_name
* @property string $path
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Collection|Flight[] $flights
* @property Collection|Tour[] $tours
* @property Collection|User[] $users
*
* @package App\Models
*/
class File extends Model
{
protected $table = 'files';
protected $casts = [
'size' => 'int'
];
protected $fillable = [
'name',
'extension',
'size',
'original_name',
'path'
];
public function flights()
{
return $this->hasMany(Flight::class);
}
public function tours()
{
return $this->hasMany(Tour::class);
}
public function users()
{
return $this->hasMany(User::class);
}
}
+89
View File
@@ -0,0 +1,89 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Flight
*
* @property int $id
* @property string $title
* @property int|null $file_id
* @property int $airline_id
* @property int $flight_type
* @property Carbon $departure_time
* @property int $departure_airport_id
* @property int $arrival_airport_id
* @property float $price
* @property string $summary
* @property int $capacity
* @property string $description
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Airline $airline
* @property File|null $file
* @property Airport $airport
* @property Collection|Booking[] $bookings
*
* @package App\Models
*/
class Flight extends Model
{
protected $table = 'flights';
protected $casts = [
'file_id' => 'int',
'airline_id' => 'int',
'flight_type' => 'int',
'departure_time' => 'datetime',
'departure_airport_id' => 'int',
'arrival_airport_id' => 'int',
'price' => 'float',
'capacity' => 'int',
'status' => 'int'
];
protected $fillable = [
'title',
'file_id',
'airline_id',
'flight_type',
'departure_time',
'departure_airport_id',
'arrival_airport_id',
'price',
'summary',
'capacity',
'description',
'status'
];
public function airline()
{
return $this->belongsTo(Airline::class);
}
public function file()
{
return $this->belongsTo(File::class);
}
public function airport()
{
return $this->belongsTo(Airport::class, 'departure_airport_id');
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
}
+66
View File
@@ -0,0 +1,66 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Tour
*
* @property int $id
* @property string $title
* @property string $summary
* @property string $description
* @property string $origin
* @property string $destination
* @property int|null $file_id
* @property int $duration
* @property int $status
* @property Carbon $created_ar
* @property Carbon $updated_at
*
* @property File|null $file
* @property Collection|TourDate[] $tour_dates
*
* @package App\Models
*/
class Tour extends Model
{
protected $table = 'tours';
public $timestamps = false;
protected $casts = [
'file_id' => 'int',
'duration' => 'int',
'status' => 'int',
'created_ar' => 'datetime'
];
protected $fillable = [
'title',
'summary',
'description',
'origin',
'destination',
'file_id',
'duration',
'status',
'created_ar'
];
public function file()
{
return $this->belongsTo(File::class);
}
public function tour_dates()
{
return $this->hasMany(TourDate::class);
}
}
+62
View File
@@ -0,0 +1,62 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class TourDate
*
* @property int $id
* @property int $tour_id
* @property Carbon $departure_date
* @property Carbon $return_date
* @property int $price
* @property int $capacity
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Tour $tour
* @property Collection|Booking[] $bookings
*
* @package App\Models
*/
class TourDate extends Model
{
protected $table = 'tour_dates';
protected $casts = [
'tour_id' => 'int',
'departure_date' => 'datetime',
'return_date' => 'datetime',
'price' => 'int',
'capacity' => 'int',
'status' => 'int'
];
protected $fillable = [
'tour_id',
'departure_date',
'return_date',
'price',
'capacity',
'status'
];
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function bookings()
{
return $this->hasMany(Booking::class, 'toure_date_id');
}
}
+91
View File
@@ -0,0 +1,91 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class User
*
* @property int $id
* @property string $first_name
* @property string $last_name
* @property string $national_code
* @property int $gender
* @property int $marital_status
* @property string|null $spouse_name
* @property string $mobile
* @property string $email
* @property int|null $file_id
* @property string $username
* @property string $password
* @property string $password_confirmation
* @property string $user_provience
* @property string $user_city
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
* @property Carbon $deleted
*
* @property File|null $file
* @property Collection|Booking[] $bookings
* @property Collection|Comment[] $comments
*
* @package App\Models
*/
class User extends Model
{
protected $table = 'users';
protected $casts = [
'gender' => 'int',
'marital_status' => 'int',
'file_id' => 'int',
'status' => 'int',
'deleted' => 'datetime'
];
protected $hidden = [
'password'
];
protected $fillable = [
'first_name',
'last_name',
'national_code',
'gender',
'marital_status',
'spouse_name',
'mobile',
'email',
'file_id',
'username',
'password',
'password_confirmation',
'user_provience',
'user_city',
'status',
'deleted'
];
public function file()
{
return $this->belongsTo(File::class);
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
public function comments()
{
return $this->hasMany(Comment::class);
}
}