1
0
forked from metin2/web

Added website Docker image, bumped PHP version, added mall authentication, added experimental patcher support, improved migrations, added teasers

This commit is contained in:
2024-09-22 21:14:31 +03:00
parent a1d0a5b9cf
commit dea61c5a0c
253 changed files with 23071 additions and 547 deletions

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Common;
use Illuminate\Database\Eloquent\Model;
class Locale extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'common';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'locale';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'mKey';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'mKey', 'mValue'
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class Banword extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'banword';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'word';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'word'
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class ItemAttr extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'item_attr';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'apply';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class ItemAttrRare extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'item_attr_rare';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'apply';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -1,13 +1,18 @@
<?php
namespace App\Models\Game;
namespace App\Models\Game\Player;
use App\Models\Mall\MallItem;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ItemProto extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class Land extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'land';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class ObjectProto extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'object_proto';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'vnum';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,73 @@
<?php
namespace App\Models\Game\Player;
use App\Models\Account;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Player extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'player';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
/**
* Get the account that owns the player.
*/
public function account(): BelongsTo
{
return $this->belongsTo(Account::class, 'account_id', 'id');
}
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class RefineProto extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'refine_proto';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class Shop extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'shop';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'vnum';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class ShopItem extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'shop_item';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = '';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class SkillProto extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'player';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'skill_proto';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'dwVnum';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
}

View File

@ -7,6 +7,13 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
class MallCategory extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*

View File

@ -3,13 +3,20 @@
namespace App\Models\Mall;
use App\Models\Enums\MallItemPricingEnum;
use App\Models\Game\ItemProto;
use App\Models\Game\Player\ItemProto;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Facades\Auth;
class MallItem extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*