release.php 2.6 KB

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