Created
March 31, 2015 23:30
-
-
Save anonymous/a7dc114c2eb5312f2fbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Model; | |
class Trip extends \Orm\Model { | |
protected static $_belongs_to = array( | |
'user' => array( | |
'key_from' => 'user_id', | |
'model_to' => '\Model\Auth_User', | |
'key_to' => 'id', | |
) | |
); | |
protected static $_has_one = array( | |
'category' => array( | |
'key_from' => 'category_id', | |
'model_to' => '\Model\Trip_Category', | |
'key_to' => 'id' | |
) | |
); | |
protected static $_properties = array( | |
'id', | |
'user_id', | |
'category_id', | |
'title', | |
'mileage', | |
'gps_max_speed', | |
'gps_average_speed', | |
'gps_path' => array( | |
'data_type' => 'json', | |
'default' => null, | |
), | |
'notes', | |
'created_at', | |
'updated_at', | |
'finalized_at', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment