/var/www/(Del)gepgroup.hk/php-activerecord/examples/orders/models/Person.php


1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
class Person extends ActiveRecord\Model
{
    
// a person can have many orders and payments
    
static $has_many = array(
        array(
'orders'),
        array(
'payments'));

    
// must have a name and a state
    
static $validates_presence_of = array(
        array(
'name'), array('state'));
}
?>