TestFunctionFieldNameModel.php 613 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Siam
  5. * Date: 2019/12/16
  6. * Time: 15:27
  7. */
  8. namespace EasySwoole\ORM\Tests\models;
  9. use EasySwoole\ORM\AbstractModel;
  10. use EasySwoole\ORM\Utility\Schema\Table;
  11. class TestFunctionFieldNameModel extends AbstractModel
  12. {
  13. protected $tableName = 'test_field_name';
  14. public function schemaInfo(bool $isCache = TRUE): Table
  15. {
  16. $table = new Table('test_field_name');
  17. $table->colInt('id')->setIsPrimaryKey(true);
  18. $table->colChar('name', 255);
  19. $table->colChar('order', 255);
  20. $table->colInt('age');
  21. return $table;
  22. }
  23. }