首次提交 Laravel 專案
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class tg_bot extends Model
|
||||
{
|
||||
// 显式指定表名
|
||||
protected $table = 'tg_bot';
|
||||
|
||||
// 主键字段
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
// 主键是否自增
|
||||
public $incrementing = true;
|
||||
|
||||
// 主键类型(整数)
|
||||
protected $keyType = 'int';
|
||||
|
||||
// 是否自动维护 created_at 和 updated_at
|
||||
public $timestamps = true;
|
||||
|
||||
// 可批量赋值的字段
|
||||
protected $fillable = [
|
||||
'bot_id',
|
||||
'bot_token',
|
||||
'bot_username',
|
||||
'subjection_username',
|
||||
'subjection_mobile',
|
||||
'subjection',
|
||||
'webhook',
|
||||
'memo',
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user