product.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. $this->app->loadLang('product');
  3. $this->app->loadLang('program');
  4. $this->app->loadLang('tree');
  5. $schema = new stdclass();
  6. $schema->primaryTable = 'product';
  7. $schema->tables = array();
  8. $schema->tables['product'] = 'zt_product';
  9. $schema->tables['program'] = 'zt_project';
  10. $schema->tables['line'] = 'zt_module';
  11. $schema->joins = array();
  12. $schema->joins['program'] = '`product`.`program` = `program`.`id`';
  13. $schema->joins['line'] = '`product`.`line` = `line`.`id`';
  14. $schema->fields = array();
  15. $schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->product->id);
  16. $schema->fields['program'] = array('type' => 'object', 'name' => $this->lang->product->program, 'object' => 'program', 'show' => 'program.name');
  17. $schema->fields['line'] = array('type' => 'object', 'name' => $this->lang->product->line, 'object' => 'line', 'show' => 'line.name');
  18. $schema->fields['name'] = array('type' => 'string', 'name' => $this->lang->product->name);
  19. $schema->fields['code'] = array('type' => 'string', 'name' => $this->lang->product->code);
  20. $schema->fields['type'] = array('type' => 'option', 'name' => $this->lang->product->type, 'options' => $this->lang->product->typeList);
  21. $schema->fields['status'] = array('type' => 'option', 'name' => $this->lang->product->status, 'options' => $this->lang->product->statusList);
  22. $schema->fields['desc'] = array('type' => 'string', 'name' => $this->lang->product->desc);
  23. $schema->fields['PO'] = array('type' => 'user', 'name' => $this->lang->product->PO);
  24. $schema->fields['QD'] = array('type' => 'user', 'name' => $this->lang->product->QD);
  25. $schema->fields['RD'] = array('type' => 'user', 'name' => $this->lang->product->RD);
  26. $schema->fields['createdBy'] = array('type' => 'user', 'name' => $this->lang->product->createdBy);
  27. $schema->fields['createdDate'] = array('type' => 'date', 'name' => $this->lang->product->createdDate);
  28. $schema->objects = array();
  29. $schema->objects['program'] = array();
  30. $schema->objects['program']['id'] = array('type' => 'number', 'name' => $this->lang->program->id);
  31. $schema->objects['program']['name'] = array('type' => 'string', 'name' => $this->lang->program->name);
  32. $schema->objects['line'] = array();
  33. $schema->objects['line']['name'] = array('type' => 'string', 'name' => $this->lang->product->line);