Files
usedcar/app/mzl/generate/templates/ModelStub.stub
T
2025-05-14 13:19:23 +08:00

56 lines
944 B
Plaintext

<?php
namespace app\{{module}}\model;
use support\Model;
/**
* {{name}}Model
*/
class {{name}}Model extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = '{{table}}';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* 模型的数据字段的保存格式。
*
* @var string
*/
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
protected $fillable = [{{fillableFields}}];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
}