model.stub 681 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace {%modelNamespace%};
  3. use think\Model;
  4. {%sofeDeleteClassPath%}
  5. class {%modelName%} extends Model
  6. {
  7. {%softDelete%}
  8. {%modelConnection%}
  9. // 表名
  10. protected ${%modelTableType%} = '{%modelTableTypeName%}';
  11. // 自动写入时间戳字段
  12. protected $autoWriteTimestamp = {%modelAutoWriteTimestamp%};
  13. // 定义时间戳字段名
  14. protected $createTime = {%createTime%};
  15. protected $updateTime = {%updateTime%};
  16. protected $deleteTime = {%deleteTime%};
  17. // 追加属性
  18. protected $append = [
  19. {%appendAttrList%}
  20. ];
  21. {%modelInit%}
  22. {%getEnumList%}
  23. {%getAttrList%}
  24. {%setAttrList%}
  25. {%relationMethodList%}
  26. }