38 lines
843 B
PHP
38 lines
843 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/** 注项展开组合 {@see ticket_combinations} */
|
|
class TicketCombination extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'ticket_item_id',
|
|
'combination_no',
|
|
'number_4d',
|
|
'bet_amount',
|
|
'estimated_payout',
|
|
'created_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'ticket_item_id' => 'integer',
|
|
'combination_no' => 'integer',
|
|
'bet_amount' => 'integer',
|
|
'estimated_payout' => 'integer',
|
|
'created_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function item(): BelongsTo
|
|
{
|
|
return $this->belongsTo(TicketItem::class, 'ticket_item_id');
|
|
}
|
|
}
|