Changeset View
Changeset View
Standalone View
Standalone View
src/app/Wallet.php
<?php | <?php | ||||
namespace App; | namespace App; | ||||
use App\User; | use App\User; | ||||
use App\Traits\SettingsTrait; | use App\Traits\SettingsTrait; | ||||
use App\Traits\UuidStrKeyTrait; | |||||
use Carbon\Carbon; | use Carbon\Carbon; | ||||
use Iatstuti\Database\Support\NullableFields; | use Iatstuti\Database\Support\NullableFields; | ||||
use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||
use Illuminate\Support\Facades\DB; | use Illuminate\Support\Facades\DB; | ||||
/** | /** | ||||
* The eloquent definition of a wallet -- a container with a chunk of change. | * The eloquent definition of a wallet -- a container with a chunk of change. | ||||
* | * | ||||
* A wallet is owned by an {@link \App\User}. | * A wallet is owned by an {@link \App\User}. | ||||
* | * | ||||
* @property int $balance Current balance in cents | * @property int $balance Current balance in cents | ||||
* @property string $currency Currency code | * @property string $currency Currency code | ||||
* @property ?string $description Description | * @property ?string $description Description | ||||
* @property string $id Unique identifier | * @property string $id Unique identifier | ||||
* @property ?\App\User $owner Owner (can be null when owner is deleted) | * @property ?\App\User $owner Owner (can be null when owner is deleted) | ||||
* @property int $user_id Owner's identifier | * @property int $user_id Owner's identifier | ||||
*/ | */ | ||||
class Wallet extends Model | class Wallet extends Model | ||||
{ | { | ||||
use NullableFields; | use NullableFields; | ||||
use SettingsTrait; | use SettingsTrait; | ||||
use UuidStrKeyTrait; | |||||
public $incrementing = false; | |||||
protected $keyType = 'string'; | |||||
public $timestamps = false; | public $timestamps = false; | ||||
/** | /** | ||||
* The attributes' default values. | * The attributes' default values. | ||||
* | * | ||||
* @var array | * @var array | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |