You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
681 B
41 lines
681 B
2 months ago
|
<?php
|
||
|
|
||
|
namespace {%modelNamespace%};
|
||
|
|
||
|
use think\Model;
|
||
|
{%softDeleteClassPath%}
|
||
|
|
||
|
class {%modelName%} extends Model
|
||
|
{
|
||
|
|
||
|
{%softDelete%}
|
||
|
|
||
|
{%modelConnection%}
|
||
|
|
||
|
// 表名
|
||
|
protected ${%modelTableType%} = '{%modelTableTypeName%}';
|
||
|
|
||
|
// 自动写入时间戳字段
|
||
|
protected $autoWriteTimestamp = {%modelAutoWriteTimestamp%};
|
||
|
|
||
|
// 定义时间戳字段名
|
||
|
protected $createTime = {%createTime%};
|
||
|
protected $updateTime = {%updateTime%};
|
||
|
protected $deleteTime = {%deleteTime%};
|
||
|
|
||
|
// 追加属性
|
||
|
protected $append = [
|
||
|
{%appendAttrList%}
|
||
|
];
|
||
|
|
||
|
{%modelInit%}
|
||
|
|
||
|
{%getEnumList%}
|
||
|
|
||
|
{%getAttrList%}
|
||
|
|
||
|
{%setAttrList%}
|
||
|
|
||
|
{%relationMethodList%}
|
||
|
}
|