1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-07-08 09:34:23 +03:00
kangana/application/classes/Model/Task.php

44 lines
780 B
PHP
Raw Normal View History

2014-01-17 13:39:34 +02:00
<?php defined('SYSPATH') OR die('No direct access allowed.');
2014-01-18 08:03:47 +02:00
/**
* Task model.
* Task is a job to send the next letter in a subscription.
* @package Models
* @author Oreolek
**/
2014-01-17 13:39:34 +02:00
class Model_Task extends ORM {
2014-01-18 08:03:47 +02:00
const STATUS_UNKNOWN = 0;
const STATUS_PENDING = 1;
const STATUS_SENDING = 2;
const STATUS_SENT = 3;
protected $has_many = array(
'letter',
'client'
);
/**
* @return array validation rules
**/
public function rules()
{
return array(
'date' => array(
array('not_empty'),
array('date'),
),
'status' => array(
array('numeric')
)
);
}
/**
* Array of field labels.
* Used in forms.
**/
protected $_labels = array(
'date' => 'Mailing date',
'status' => 'Status'
);
2014-01-17 13:39:34 +02:00
}