Basic skeleton

<?php
/**
 * Copyright (c) 2011 Laposa Ltd (http://laposa.co.uk)
 * Licensed under the New BSD License. See the file LICENSE.txt for details.
 *
 */

class your_classs_name extends Onxshop_Model {

  public $id;

  public $title;

  public $_hashMap = array(

    'id'=>array('label' => 'ID', 'validation'=>'int', 'required'=>true),

    'title'=>array('label' => 'Title', 'validation'=>'string', 'required'=>true)

  );

  /**
   * create table sql
   */

  private function getCreateTableSql() {

    $sql = "
    CREATE TABLE client_address (
      id serial NOT NULL PRIMARY KEY,
      name varchar(255) NOT NULL
    );
    ";

    return $sql;
  }

  /**
   * init configuration
   */

  static function initConfiguration() {

    if (array_key_exists('your_classs_name', $GLOBALS['onxshop_conf'])) $conf = $GLOBALS['onxshop_conf']['your_classs_name'];
    else $conf = array();

    return $conf;
  }

}

Practical examples

laposa/github/models

Please note that each each model is extending Onxshop_Model class.

For database access is used Zend_Db.

Extending Model

Simply add another column with prefix "local_", e.g. local_my_own_attribute. This will secure future Onxshop upgrades will not conflict with your own attributes.