This commit is contained in:
2026-08-15 12:35:30 +03:30
commit 60936f504d
77 changed files with 14152 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}
+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 $country
* @property string $phone
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Collection|Flight[] $flights
*
* @package App\Models
*/
class Airline extends Model
{
protected $table = 'airlines';
public static $snakeAttributes = false;
protected $casts = [
'status' => 'int'
];
protected $fillable = [
'name',
'country',
'phone',
'status'
];
public function flights()
{
return $this->hasMany(Flight::class);
}
}
+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 Airport
*
* @property int $id
* @property string $name
* @property string $city
* @property string $country
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Collection|Flight[] $flights
*
* @package App\Models
*/
class Airport extends Model
{
protected $table = 'airports';
public static $snakeAttributes = false;
protected $casts = [
'status' => 'int'
];
protected $fillable = [
'name',
'city',
'country',
'status'
];
public function flights()
{
return $this->hasMany(Flight::class, 'destination_airport_id');
}
}
+67
View File
@@ -0,0 +1,67 @@
<?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|null $flight_id
* @property int|null $tour_departure_id
* @property int $total_price
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string $booking_type
*
* @property User $user
* @property TourDeparture|null $tourDeparture
* @property Flight|null $flight
*
* @package App\Models
*/
class Booking extends Model
{
protected $table = 'booking';
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'flight_id' => 'int',
'tour_departure_id' => 'int',
'total_price' => 'int',
'status' => 'int'
];
protected $fillable = [
'user_id',
'flight_id',
'tour_departure_id',
'total_price',
'status',
'booking_type'
];
public function user()
{
return $this->belongsTo(User::class);
}
public function tourDeparture()
{
return $this->belongsTo(TourDeparture::class);
}
public function flight()
{
return $this->belongsTo(Flight::class);
}
}
+50
View File
@@ -0,0 +1,50 @@
<?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 int $passenger_id
* @property bool $passenger_type
* @property string $seat_number
* @property string $ticket_number
* @property int $price
* @property bool $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @package App\Models
*/
class BookingPassenger extends Model
{
protected $table = 'booking_passengers';
public static $snakeAttributes = false;
protected $casts = [
'booking_id' => 'int',
'passenger_id' => 'int',
'passenger_type' => 'bool',
'price' => 'int',
'status' => 'bool'
];
protected $fillable = [
'booking_id',
'passenger_id',
'passenger_type',
'seat_number',
'ticket_number',
'price',
'status'
];
}
+56
View File
@@ -0,0 +1,56 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class City
*
* @property int $id
* @property int $county_id
* @property string $name
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
* @property Country $country
* @property Collection|Tour[] $tours
*
* @package App\Models
*/
class City extends Model
{
use SoftDeletes;
protected $table = 'cities';
public static $snakeAttributes = false;
protected $casts = [
'county_id' => 'int',
'status' => 'int'
];
protected $fillable = [
'county_id',
'name',
'status'
];
public function country()
{
return $this->belongsTo(Country::class, 'county_id');
}
public function tours()
{
return $this->hasMany(Tour::class, 'destination_city_id');
}
}
+47
View File
@@ -0,0 +1,47 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Country
*
* @property int $id
* @property string $name
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
* @property Collection|City[] $cities
*
* @package App\Models
*/
class Country extends Model
{
use SoftDeletes;
protected $table = 'countries';
public static $snakeAttributes = false;
protected $casts = [
'status' => 'int'
];
protected $fillable = [
'name',
'status'
];
public function cities()
{
return $this->hasMany(City::class, 'county_id');
}
}
+50
View File
@@ -0,0 +1,50 @@
<?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|User[] $users
*
* @package App\Models
*/
class File extends Model
{
protected $table = 'files';
public static $snakeAttributes = false;
protected $casts = [
'size' => 'int'
];
protected $fillable = [
'name',
'extension',
'size',
'original_name',
'path'
];
public function users()
{
return $this->hasMany(User::class);
}
}
+80
View File
@@ -0,0 +1,80 @@
<?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 int $airline_id
* @property int $origin_airport_id
* @property int $destination_airport_id
* @property string $flight_number
* @property Carbon $departure_time
* @property int $price
* @property int $capacity
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Airline $airline
* @property Airport $airport
* @property Collection|Booking[] $bookings
* @property Collection|Tour[] $tours
*
* @package App\Models
*/
class Flight extends Model
{
protected $table = 'flights';
public static $snakeAttributes = false;
protected $casts = [
'airline_id' => 'int',
'origin_airport_id' => 'int',
'destination_airport_id' => 'int',
'departure_time' => 'datetime',
'price' => 'int',
'capacity' => 'int',
'status' => 'int'
];
protected $fillable = [
'airline_id',
'origin_airport_id',
'destination_airport_id',
'flight_number',
'departure_time',
'price',
'capacity',
'status'
];
public function airline()
{
return $this->belongsTo(Airline::class);
}
public function airport()
{
return $this->belongsTo(Airport::class, 'destination_airport_id');
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
public function tours()
{
return $this->hasMany(Tour::class, 'file_id');
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Passenger
*
* @property int $id
* @property int $user_id
* @property string $first_name
* @property string $last_name
* @property string $national_code
* @property string $passport_number
* @property int $gender
* @property Carbon|null $birth_date
* @property string $mobile
* @property string $email
* @property string $nationality
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
* @property User $user
*
* @package App\Models
*/
class Passenger extends Model
{
use SoftDeletes;
protected $table = 'passengers';
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'gender' => 'int',
'birth_date' => 'datetime'
];
protected $fillable = [
'user_id',
'first_name',
'last_name',
'national_code',
'passport_number',
'gender',
'birth_date',
'mobile',
'email',
'nationality'
];
public function user()
{
return $this->belongsTo(User::class);
}
}
+68
View File
@@ -0,0 +1,68 @@
<?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 int $origin_city_id
* @property int $destination_city_id
* @property int $file_id
* @property string $tour_type
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Flight $flight
* @property City $city
* @property Collection|TourDeparture[] $tourDepartures
*
* @package App\Models
*/
class Tour extends Model
{
protected $table = 'tours';
public static $snakeAttributes = false;
protected $casts = [
'origin_city_id' => 'int',
'destination_city_id' => 'int',
'file_id' => 'int'
];
protected $fillable = [
'title',
'summary',
'description',
'origin_city_id',
'destination_city_id',
'file_id',
'tour_type'
];
public function flight()
{
return $this->belongsTo(Flight::class, 'file_id');
}
public function city()
{
return $this->belongsTo(City::class, 'destination_city_id');
}
public function tourDepartures()
{
return $this->hasMany(TourDeparture::class);
}
}
+63
View File
@@ -0,0 +1,63 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class TourDeparture
*
* @property int $id
* @property int $tour_id
* @property Carbon $start_date
* @property Carbon $end_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 TourDeparture extends Model
{
protected $table = 'tour_departures';
public static $snakeAttributes = false;
protected $casts = [
'tour_id' => 'int',
'start_date' => 'datetime',
'end_date' => 'datetime',
'price' => 'int',
'capacity' => 'int',
'status' => 'int'
];
protected $fillable = [
'tour_id',
'start_date',
'end_date',
'price',
'capacity',
'status'
];
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
}
+88
View File
@@ -0,0 +1,88 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class User
*
* @property int $id
* @property string $first_name
* @property string $last_name
* @property int $file_id
* @property string $national_code
* @property int $gender
* @property int $marital_status
* @property string|null $spouse_name
* @property string $mobile
* @property string $email
* @property string $username
* @property string $password
* @property string|null $user_province
* @property int|null $user_city
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
* @property File $file
* @property Collection|Booking[] $bookings
* @property Collection|Passenger[] $passengers
*
* @package App\Models
*/
class User extends Model
{
use SoftDeletes;
protected $table = 'users';
public static $snakeAttributes = false;
protected $casts = [
'file_id' => 'int',
'gender' => 'int',
'marital_status' => 'int',
'user_city' => 'int'
];
protected $hidden = [
'password'
];
protected $fillable = [
'first_name',
'last_name',
'file_id',
'national_code',
'gender',
'marital_status',
'spouse_name',
'mobile',
'email',
'username',
'password',
'user_province',
'user_city'
];
public function file()
{
return $this->belongsTo(File::class);
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
public function passengers()
{
return $this->hasMany(Passenger::class);
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}