root/tags/0.10.0/models/App_User.php

Revision 2353, 0.6 KB (checked in by meus, 16 months ago)

moved all models to trunk/models. removed some old invalid testcases

Line 
1<?php
2class App_User extends Doctrine_Record {
3    public function setTableDefinition() {
4        $this->hasColumn('first_name', 'string', 32);
5        $this->hasColumn('last_name', 'string', 32);
6        $this->hasColumn('email', 'string', 128, 'email');
7        $this->hasColumn('username', 'string', 16, 'unique, nospace');
8        $this->hasColumn('password', 'string', 128, 'notblank');
9        $this->hasColumn('country', 'string', 2, 'country');
10        $this->hasColumn('zipcode', 'string', 9, 'nospace');
11    }
12    public function setUp() {
13        $this->hasMany('App', 'App.user_id');
14    }   
15}
Note: See TracBrowser for help on using the browser.