mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 10:38:14 -05:00
29 lines
606 B
PHP
29 lines
606 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Ticket extends Model
|
|
{
|
|
protected $table = 'v2_ticket';
|
|
protected $dateFormat = 'U';
|
|
protected $guarded = ['id'];
|
|
protected $casts = [
|
|
'created_at' => 'timestamp',
|
|
'updated_at' => 'timestamp'
|
|
];
|
|
|
|
const STATUS_OPENING = 0;
|
|
const STATUS_CLOSED = 1;
|
|
public static $statusMap = [
|
|
self::STATUS_OPENING => '开启',
|
|
self::STATUS_CLOSED => '关闭'
|
|
];
|
|
|
|
public function message()
|
|
{
|
|
return $this->hasMany(TicketMessage::class, 'ticket_id', 'id');
|
|
}
|
|
}
|