Skip to content

Instantly share code, notes, and snippets.

@ThePixelDeveloper
Created June 5, 2011 10:31
Show Gist options
  • Save ThePixelDeveloper/1008854 to your computer and use it in GitHub Desktop.
Save ThePixelDeveloper/1008854 to your computer and use it in GitHub Desktop.
<?php defined('SYSPATH') or die('No direct script access.');
class Model_Day extends ORM {
protected $_table_columns = array(
'day' => array('data_type' => 'date', 'is_nullable' => FALSE),
'max_events' => array('data_type' => 'int', 'is_nullable' => FALSE, 'default' => 10),
);
protected $_primary_key = 'day';
protected $_has_many = array(
'event_start_day' => array('model' => 'event', 'far_key' => 'starting_day'),
'event_end_day' => array('model' => 'event', 'far_key' => 'ending_day'),
'event_until' => array('model' => 'event', 'far_key' => 'opened_until'),
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment