model.stub 571 B

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