69 lines
1.7 KiB
PHP
69 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
use Hyperf\DbConnection\Model\Model;
|
|
|
|
/**
|
|
* @property int $id 主键 - 来自远程 和 tools 保持一致
|
|
* @property int $company_id 店铺所属的公司 ID
|
|
* @property int $platform_id 平台 ID
|
|
* @property string $platform_store_id 平台店铺 ID
|
|
* @property int $warehouse_id 店铺使用的仓库 ID
|
|
* @property int $currency_id 店铺的本币 ID
|
|
* @property boolean $enabled 激活状态
|
|
* @property string $name 店铺名 英文
|
|
* @property string $label 店铺名 中文
|
|
* @property array $ext 扩展字段
|
|
* @property \Carbon\Carbon $created_at
|
|
* @property \Carbon\Carbon $updated_at
|
|
*/
|
|
class Store extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*/
|
|
protected ?string $table = 'stores';
|
|
|
|
/**
|
|
* Indicates if the IDs are auto-incrementing.
|
|
* 由于 ID 来自远程系统,禁用自增
|
|
*/
|
|
public bool $incrementing = false;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected array $fillable = [
|
|
'id',
|
|
'company_id',
|
|
'platform_id',
|
|
'platform_store_id',
|
|
'warehouse_id',
|
|
'currency_id',
|
|
'enabled',
|
|
'name',
|
|
'label',
|
|
'ext',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*/
|
|
protected array $casts = [
|
|
'id' => 'integer',
|
|
'company_id' => 'integer',
|
|
'platform_id' => 'integer',
|
|
'warehouse_id' => 'integer',
|
|
'currency_id' => 'integer',
|
|
'enabled' => 'boolean',
|
|
'ext' => 'array',
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
}
|