Files
datahub/backend/app/Model/Company.php
T
2025-11-11 09:11:13 +08:00

47 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id 公司ID(来自远程)
* @property string $name 公司名 英文
* @property string $label 公司名 中文
* @property boolean $enabled 激活状态
* @property array $ext 额外信息
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*/
class Company extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'companies';
/**
* Indicates if the IDs are auto-incrementing.
* 由于 ID 来自远程系统,禁用自增
*/
public bool $incrementing = false;
/**
* 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.
*/
protected array $casts = [
'id' => 'integer',
'enabled' => 'boolean',
'ext' => 'array',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}