Initial commit: Sistema de comisiones y gastos personales
This commit is contained in:
48
app/Models/TelegramAccount.php
Executable file
48
app/Models/TelegramAccount.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
#[Fillable(['user_id', 'chat_id', 'verification_code', 'is_verified'])]
|
||||
class TelegramAccount extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'telegram_accounts';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'chat_id',
|
||||
'verification_code',
|
||||
'is_verified',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_verified' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Relación con usuario
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user