testtask.php 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. $this->app->loadLang('product');
  3. $this->app->loadLang('project');
  4. $this->app->loadLang('execution');
  5. $this->app->loadLang('build');
  6. $this->app->loadLang('testtask');
  7. $schema = new stdclass();
  8. $schema->primaryTable = 'testtask';
  9. $schema->tables = array();
  10. $schema->tables['product'] = 'zt_product';
  11. $schema->tables['project'] = 'zt_project';
  12. $schema->tables['execution'] = 'zt_project';
  13. $schema->tables['build'] = 'zt_build';
  14. $schema->tables['testtask'] = 'zt_testtask';
  15. $schema->joins = array();
  16. $schema->joins['product'] = '`product`.`id` = `testtask`.`product`';
  17. $schema->joins['project'] = '`project`.`id` = CAST(`testtask`.`project` AS DECIMAL)';
  18. $schema->joins['execution'] = '`execution`.`id` = `testtask`.`execution`';
  19. $schema->joins['build'] = '`build`.`id` = CAST(`testtask`.`build` AS DECIMAL)';
  20. $schema->fields = array();
  21. $schema->fields['product'] = array('type' => 'object', 'name' => $this->lang->testtask->product, 'object' => 'product', 'show' => 'product.name');
  22. $schema->fields['project'] = array('type' => 'object', 'name' => $this->lang->testtask->project, 'object' => 'project', 'show' => 'project.name');
  23. $schema->fields['execution'] = array('type' => 'object', 'name' => $this->lang->testtask->execution, 'object' => 'execution', 'show' => 'execution.name');
  24. $schema->fields['build'] = array('type' => 'object', 'name' => $this->lang->testtask->build, 'object' => 'build', 'show' => 'build.name');
  25. $schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->testtask->id);
  26. $schema->fields['name'] = array('type' => 'string', 'name' => $this->lang->testtask->name);
  27. $schema->fields['type'] = array('type' => 'option', 'name' => $this->lang->testtask->type, 'options' => $this->lang->testtask->typeList);
  28. $schema->fields['owner'] = array('type' => 'user', 'name' => $this->lang->testtask->owner);
  29. $schema->fields['pri'] = array('type' => 'option', 'name' => $this->lang->testtask->pri, 'options' => $this->lang->testtask->priList);
  30. $schema->fields['begin'] = array('type' => 'date', 'name' => $this->lang->testtask->begin);
  31. $schema->fields['end'] = array('type' => 'date', 'name' => $this->lang->testtask->end);
  32. $schema->fields['status'] = array('type' => 'option', 'name' => $this->lang->testtask->status, 'options' => $this->lang->testtask->statusList);
  33. $schema->objects = array();
  34. $schema->objects['product'] = array();
  35. $schema->objects['product']['id'] = array('type' => 'number', 'name' => $this->lang->product->id);
  36. $schema->objects['product']['name'] = array('type' => 'string', 'name' => $this->lang->product->name);
  37. $schema->objects['project'] = array();
  38. $schema->objects['project']['id'] = array('type' => 'number', 'name' => $this->lang->project->id);
  39. $schema->objects['project']['name'] = array('type' => 'string', 'name' => $this->lang->project->name);
  40. $schema->objects['execution'] = array();
  41. $schema->objects['execution']['id'] = array('type' => 'number', 'name' => $this->lang->execution->id);
  42. $schema->objects['execution']['name'] = array('type' => 'string', 'name' => $this->lang->execution->name);
  43. $schema->objects['build'] = array();
  44. $schema->objects['build']['id'] = array('type' => 'number', 'name' => $this->lang->build->id);
  45. $schema->objects['build']['name'] = array('type' => 'string', 'name' => $this->lang->build->name);