}
`
V. The Order model would start with:
class Order extends CActiveRecord
{
const STATUS_INITIATED = 1;
const STATUS_CANCELED = 2;
const STATUS_EXPIRED = 3;
const STATUS_PAID = 4;
public $statuses = array(
self::STATUS_INITIATED => 'Initiated',
self::STATUS_CANCELED => 'Canceled',
self::STATUS_EXPIRED => 'Expired',
self::STATUS_PAID => 'Paid',
);
// more cod...