user.php 548 B

123456789101112131415161718
  1. <?php
  2. $this->app->loadLang('user');
  3. $this->app->loadLang('dept');
  4. $schema = new stdclass();
  5. $schema->primaryTable = 'user';
  6. $schema->tables = array();
  7. $schema->tables['user'] = 'zt_user';
  8. $schema->tables['dept'] = 'zt_dept';
  9. $schema->joins = array();
  10. $schema->joins['dept'] = 'dept.id = user.dept';
  11. $schema->fields = array();
  12. $schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->user->id);
  13. $schema->fields['dept'] = array('type' => 'object', 'name' => $this->lang->user->dept, 'object' => 'dept', 'show' => 'dept.name');