1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-06-16 15:01:09 +03:00

Bugfix: course subscription

This commit is contained in:
Alexander Yakovlev 2014-02-06 10:11:52 +07:00
parent 9834cf2010
commit 5d6ffa79d9
2 changed files with 11 additions and 3 deletions

View file

@ -7,6 +7,10 @@
**/
class Model_Client extends ORM {
protected $_has_many = array(
'course' => array(
'model' => 'Course',
'through' => 'clients_courses'
),
'subscription' => array(
'model' => 'Subscription',
'through' => 'clients_subscriptions'

View file

@ -1,7 +1,7 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Task model.
* Task is a job to send the next letter in a subscription.
* Task is a job to send the next letter in a course.
* @package Models
* @author Oreolek
**/
@ -12,8 +12,12 @@ class Model_Task extends ORM {
const STATUS_SENT = 3;
protected $_has_many = array(
'letter',
'client'
'letter' => array(
'model' => 'Letter'
),
'client' => array(
'model' => 'Client'
)
);
/**