36 lines
855 B
Plaintext
36 lines
855 B
Plaintext
<?php
|
||
namespace App\Models;
|
||
|
||
use Illuminate\Database\Eloquent\Model;
|
||
|
||
class tg_chats extends Model{
|
||
protected $primaryKey = 'chat_id';
|
||
public $incrementing = false; // Telegram 的 chat_id 是 bigint,可為負數
|
||
protected $keyType = 'string';
|
||
protected $fillable = [
|
||
'chat_id',
|
||
'type',
|
||
'title',
|
||
'username',
|
||
'description',
|
||
'invite_link',
|
||
'photo_small_file_id',
|
||
'photo_big_file_id',
|
||
];
|
||
|
||
protected $casts = [
|
||
'chat_id' => 'integer',
|
||
'type' => 'string',
|
||
'title' => 'string',
|
||
'username' => 'string',
|
||
'description' => 'string',
|
||
'invite_link' => 'string',
|
||
'photo_small_file_id' => 'string',
|
||
'photo_big_file_id' => 'string',
|
||
'created_at' => 'datetime',
|
||
'updated_at' => 'datetime',
|
||
];
|
||
|
||
}
|
||
|