add card pins
This commit is contained in:
76
app/Modules/CardPinOrder/Models/CardPinOrder.php
Normal file
76
app/Modules/CardPinOrder/Models/CardPinOrder.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\CardPinOrder\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Modules\Branch\Models\Branch;
|
||||
use App\Modules\CardOrder\Models\CardType;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*
|
||||
* @property string unique_id
|
||||
* @property int $user_id
|
||||
* @property int $card_type_id
|
||||
* @property string $card_number
|
||||
* @property string $region
|
||||
* @property int $branch_id
|
||||
* @property string $customer_name
|
||||
* @property string $customer_surname
|
||||
* @property string $customer_patronic_name
|
||||
* @property date $born_at
|
||||
* @property string $phone
|
||||
* @property string $passport_serie
|
||||
* @property string $passport_id
|
||||
* @property text $passport_one
|
||||
* @property text $passport_two
|
||||
* @property text $passport_three
|
||||
* @property text $passport_four
|
||||
* @property string $status
|
||||
* @property null|string $notes
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*/
|
||||
class CardPinOrder extends Model
|
||||
{
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'born_at' => 'date',
|
||||
];
|
||||
|
||||
/**
|
||||
* User
|
||||
*
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Card type
|
||||
*
|
||||
* @return BelongsTo<CardType, $this>
|
||||
*/
|
||||
public function cardType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CardType::class, 'card_type_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch
|
||||
*
|
||||
* @return BelongsTo<Branch, $this>
|
||||
*/
|
||||
public function branch(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Branch::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user