task.php 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. $this->app->loadLang('task');
  3. $this->app->loadLang('project');
  4. $this->app->loadLang('execution');
  5. $this->app->loadLang('story');
  6. $this->app->loadLang('tree');
  7. $this->app->loadLang('dataview');
  8. $schema = new stdclass();
  9. $schema->primaryTable = 'task';
  10. $schema->tables = array();
  11. $schema->tables['task'] = 'zt_task';
  12. $schema->tables['project'] = 'zt_project';
  13. $schema->tables['execution'] = 'zt_project';
  14. $schema->tables['story'] = 'zt_story';
  15. $schema->tables['taskmodule'] = 'zt_module';
  16. $schema->joins = array();
  17. $schema->joins['execution'] = '`task`.`execution` = `execution`.`id`';
  18. $schema->joins['project'] = '`task`.`project` = `project`.`id`';
  19. $schema->joins['story'] = '`task`.`story` = `story`.`id`';
  20. $schema->joins['taskmodule'] = '`task`.`module` = `taskmodule`.`id`';
  21. $schema->fields = array();
  22. $schema->fields['project'] = array('type' => 'object', 'name' => $this->lang->task->project, 'object' => 'project', 'show' => 'project.name');
  23. $schema->fields['execution'] = array('type' => 'object', 'name' => $this->lang->task->execution, 'object' => 'execution', 'show' => 'execution.name');
  24. $schema->fields['story'] = array('type' => 'object', 'name' => $this->lang->task->story, 'object' => 'story', 'show' => 'story.title');
  25. $schema->fields['taskmodule'] = array('type' => 'object', 'name' => $this->lang->task->module, 'object' => 'taskmodule', 'show' => 'taskmodule.name');
  26. $schema->fields['name'] = array('type' => 'string', 'name' => $this->lang->task->name);
  27. $schema->fields['pri'] = array('type' => 'option', 'name' => $this->lang->task->pri, 'options' => $this->lang->task->priList);
  28. $schema->fields['type'] = array('type' => 'option', 'name' => $this->lang->task->type, 'options' => $this->lang->task->typeList);
  29. $schema->fields['status'] = array('type' => 'option', 'name' => $this->lang->task->status, 'options' => $this->lang->task->statusList);
  30. $schema->fields['desc'] = array('type' => 'string', 'name' => $this->lang->task->desc);
  31. $schema->fields['estimate'] = array('type' => 'string', 'name' => $this->lang->task->estimate);
  32. $schema->fields['consumed'] = array('type' => 'string', 'name' => $this->lang->task->consumed);
  33. $schema->fields['left'] = array('type' => 'string', 'name' => $this->lang->task->left);
  34. $schema->fields['estStarted'] = array('type' => 'date', 'name' => $this->lang->task->estStarted);
  35. $schema->fields['deadline'] = array('type' => 'date', 'name' => $this->lang->task->deadline);
  36. $schema->fields['assignedTo'] = array('type' => 'user', 'name' => $this->lang->task->assignedTo);
  37. $schema->fields['finishedBy'] = array('type' => 'user', 'name' => $this->lang->task->finishedBy);
  38. $schema->fields['closedBy'] = array('type' => 'user', 'name' => $this->lang->task->closedBy);
  39. $schema->fields['openedBy'] = array('type' => 'user', 'name' => $this->lang->task->openedBy);
  40. $schema->fields['openedDate'] = array('type' => 'date', 'name' => $this->lang->task->openedDate);
  41. $schema->fields['canceledBy'] = array('type' => 'user', 'name' => $this->lang->task->canceledBy);
  42. $schema->fields['closedReason'] = array('type' => 'option', 'name' => $this->lang->task->closedReason, 'options' => $this->lang->task->reasonList);
  43. $schema->objects = array();
  44. $schema->objects['project'] = array();
  45. $schema->objects['project']['id'] = array('type' => 'number', 'name' => $this->lang->project->id);
  46. $schema->objects['project']['name'] = array('type' => 'string', 'name' => $this->lang->project->name);
  47. $schema->objects['execution'] = array();
  48. $schema->objects['execution']['id'] = array('type' => 'number', 'name' => $this->lang->execution->id);
  49. $schema->objects['execution']['name'] = array('type' => 'string', 'name' => $this->lang->execution->name);
  50. $schema->objects['story'] = array();
  51. $schema->objects['story']['id'] = array('type' => 'number', 'name' => $this->lang->story->id);
  52. $schema->objects['story']['title'] = array('type' => 'string', 'name' => $this->lang->story->title);
  53. $schema->objects['taskmodule'] = array();
  54. $schema->objects['taskmodule']['id'] = array('type' => 'number', 'name' => $this->lang->dataview->id);
  55. $schema->objects['taskmodule']['name'] = array('type' => 'string', 'name' => $this->lang->tree->name);