testcase.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. $this->app->loadLang('product');
  3. $this->app->loadLang('testcase');
  4. $this->app->loadLang('testtask');
  5. $this->app->loadLang('tree');
  6. $this->app->loadLang('story');
  7. $this->app->loadLang('dataview');
  8. $schema = new stdclass();
  9. $schema->primaryTable = 'testcase';
  10. $schema->tables = array();
  11. $schema->tables['testcase'] = 'zt_case';
  12. $schema->tables['product'] = 'zt_product';
  13. $schema->tables['casemodule'] = 'zt_module';
  14. $schema->tables['story'] = 'zt_story';
  15. $schema->tables['casestep'] = 'zt_casestep';
  16. $schema->joins = array();
  17. $schema->joins['product'] = '`product`.`id` = `testcase`.`product`';
  18. $schema->joins['casemodule'] = '`casemodule`.`id` = `testcase`.`module`';
  19. $schema->joins['story'] = '`story`.`id` = `testcase`.`story`';
  20. $schema->joins['casestep'] = '`casestep`.`case` = `testcase`.`id`';
  21. $schema->fields = array();
  22. $schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->testcase->id);
  23. $schema->fields['title'] = array('type' => 'string', 'name' => $this->lang->testcase->title);
  24. $schema->fields['pri'] = array('type' => 'option', 'name' => $this->lang->testcase->pri, 'options' => $this->lang->testcase->priList);
  25. $schema->fields['type'] = array('type' => 'option', 'name' => $this->lang->testcase->type, 'options' => $this->lang->testcase->typeList);
  26. $schema->fields['stage'] = array('type' => 'option', 'name' => $this->lang->testcase->stage, 'options' => $this->lang->testcase->stageList);
  27. $schema->fields['status'] = array('type' => 'option', 'name' => $this->lang->testcase->status, 'options' => $this->lang->testcase->statusList);
  28. $schema->fields['version'] = array('type' => 'number', 'name' => $this->lang->testcase->version);
  29. $schema->fields['product'] = array('type' => 'object', 'name' => $this->lang->testcase->product, 'object' => 'product', 'show' => 'product.name');
  30. $schema->fields['story'] = array('type' => 'object', 'name' => $this->lang->testcase->story, 'object' => 'story', 'show' => 'story.title');
  31. $schema->fields['casemodule'] = array('type' => 'object', 'name' => $this->lang->testcase->module, 'object' => 'casemodule', 'show' => 'casemodule.name');
  32. $schema->fields['openedBy'] = array('type' => 'user', 'name' => $this->lang->testcase->openedBy);
  33. $schema->fields['openedDate'] = array('type' => 'date', 'name' => $this->lang->testcase->openedDate);
  34. $schema->objects = array();
  35. $schema->objects['product'] = array();
  36. $schema->objects['product']['id'] = array('type' => 'number', 'name' => $this->lang->product->id);
  37. $schema->objects['product']['name'] = array('type' => 'string', 'name' => $this->lang->product->common);
  38. $schema->objects['casemodule'] = array();
  39. $schema->objects['casemodule']['id'] = array('type' => 'number', 'name' => $this->lang->dataview->id);
  40. $schema->objects['casemodule']['name'] = array('type' => 'string', 'name' => $this->lang->tree->name);
  41. $schema->objects['story'] = array();
  42. $schema->objects['story']['id'] = array('type' => 'number', 'name' => $this->lang->story->id);
  43. $schema->objects['story']['title'] = array('type' => 'string', 'name' => $this->lang->story->title);