Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- User:
- tableName: user
- className: User
- columns:
- id:
- notnull: true
- primary: true
- autoincrement: true
- type: integer
- length: 11
- client_id:
- notnull: true
- type: integer
- length: 11
- name: id
- first_name:
- type: string
- length: 31
- middle_name:
- default: NULL
- notnull: false
- type: string
- length: 31
- last_name:
- type: string
- length: 31
- username:
- type: string
- length: 31
- password:
- type: string
- length: 255
- email:
- type: string
- length: 127
- relations:
- Client:
- local: client_id
- foreign: id
- actAs:
- NestedSet:
- hasManyRoots: true
- rootColumnName: root_id
- public function setTableDefinition()
- {
- $this->setTableName('user');
- $this->hasColumn('id', 'integer', 11, array('notnull' => true));
- $this->hasColumn('client_id', 'integer', 11, array('notnull' => true));
- $this->hasColumn('first_name', 'string', 31);
- $this->hasColumn('middle_name', 'string', 31);
- $this->hasColumn('last_name', 'string', 31);
- $this->hasColumn('username', 'string', 31);
- $this->hasColumn('password', 'string', 255);
- $this->hasColumn('email', 'string', 127);
- $this->actAs('NestedSet', array (
- 'hasManyRoots' => true,
- 'rootColumnName' => 'root_id',
- ));
- }
Add Comment
Please, Sign In to add comment