build.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. $this->app->loadLang('product');
  3. $this->app->loadLang('project');
  4. $this->app->loadLang('execution');
  5. $this->app->loadLang('build');
  6. $schema = new stdclass();
  7. $schema->primaryTable = 'build';
  8. $schema->tables = array();
  9. $schema->tables['product'] = 'zt_product';
  10. $schema->tables['project'] = 'zt_project';
  11. $schema->tables['execution'] = 'zt_project';
  12. $schema->tables['build'] = 'zt_build';
  13. $schema->joins = array();
  14. $schema->joins['product'] = '`product`.`id` = `build`.`product`';
  15. $schema->joins['project'] = '`project`.`id` = `build`.`project`';
  16. $schema->joins['execution'] = '`execution`.`id` = `build`.`execution`';
  17. $schema->fields = array();
  18. $schema->fields['product'] = array('type' => 'object', 'name' => $this->lang->build->product, 'object' => 'product', 'show' => 'product.name');
  19. $schema->fields['project'] = array('type' => 'object', 'name' => $this->lang->build->project, 'object' => 'project', 'show' => 'project.name');
  20. $schema->fields['execution'] = array('type' => 'object', 'name' => $this->lang->build->execution, 'object' => 'execution', 'show' => 'execution.name');
  21. $schema->fields['name'] = array('type' => 'string', 'name' => $this->lang->build->name);
  22. $schema->fields['builder'] = array('type' => 'user', 'name' => $this->lang->build->builder);
  23. $schema->fields['stories'] = array('type' => 'string', 'name' => $this->lang->build->stories);
  24. $schema->fields['bugs'] = array('type' => 'string', 'name' => $this->lang->build->bugs);
  25. $schema->fields['date'] = array('type' => 'date', 'name' => $this->lang->build->date);
  26. $schema->fields['desc'] = array('type' => 'string', 'name' => $this->lang->build->desc);
  27. $schema->objects = array();
  28. $schema->objects['product'] = array();
  29. $schema->objects['product']['id'] = array('type' => 'number', 'name' => $this->lang->product->id);
  30. $schema->objects['product']['name'] = array('type' => 'string', 'name' => $this->lang->product->name);
  31. $schema->objects['project'] = array();
  32. $schema->objects['project']['id'] = array('type' => 'number', 'name' => $this->lang->project->id);
  33. $schema->objects['project']['name'] = array('type' => 'string', 'name' => $this->lang->project->name);
  34. $schema->objects['execution'] = array();
  35. $schema->objects['execution']['id'] = array('type' => 'number', 'name' => $this->lang->execution->id);
  36. $schema->objects['execution']['name'] = array('type' => 'string', 'name' => $this->lang->execution->name);