{{Entity}}.class.php 610 B

12345678910111213141516171819202122232425262728
  1. {"label":"Entité","syntax":"php"}
  2. <?php
  3. /**
  4. * Define a {{entity}}.
  5. * @author {{user.fullname}}
  6. * @category Plugin
  7. * @license copyright
  8. */
  9. class {{Entity}} extends Entity{
  10. public $id;{{:fields}}
  11. public ${{value.key}}; //{{value.label}} ({{value.typeLabel}}){{/:fields}}
  12. protected $TABLE_NAME = '{{plugin}}_{{table}}';
  13. public $fields =
  14. array(
  15. 'id' => 'key',{{:fields}}
  16. '{{value.key}}' => '{{value.sql-type}}'{{;}},{{/;}}{{/:fields}}
  17. );
  18. public $links = array({{:links}}
  19. '{{value.key}}' => '{{value.entity}}'{{;}},{{/;}}{{/:links}}
  20. );
  21. //Colonnes indexées
  22. public $indexes = array();
  23. }
  24. ?>