Files

47 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2025-11-10 15:49:11 +08:00
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Model\Model;
/**
2025-11-11 09:11:13 +08:00
* @property int $id 公司ID(来自远程)
2025-11-10 15:49:11 +08:00
* @property string $name 公司名 英文
* @property string $label 公司名 中文
* @property boolean $enabled 激活状态
2025-11-11 09:11:13 +08:00
* @property array $ext 额外信息
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
2025-11-10 15:49:11 +08:00
*/
class Company extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'companies';
2025-11-11 09:11:13 +08:00
/**
* Indicates if the IDs are auto-incrementing.
* 由于 ID 来自远程系统,禁用自增
*/
public bool $incrementing = false;
2025-11-10 15:49:11 +08:00
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['id', 'name', 'label', 'enabled', 'ext', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
*/
2025-11-11 09:11:13 +08:00
protected array $casts = [
'id' => 'integer',
'enabled' => 'boolean',
'ext' => 'array',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
2025-11-10 15:49:11 +08:00
}