<?php

/**
 * Description of Letter
 *
 * @author Arkadiusz Rychlik <a.rychlik at eppe.com.pl>
 */
class Main_Newsletter_Model_Nlletter extends Rtn_Model {

	const STATUS_NEW = 'new';
	const STATUS_PENDING = 'pending';
	const STATUS_SENT = 'sent';

	public function setPending() {
		$this->unbox()->status = self::STATUS_PENDING;
		$this->unbox()->sendstarted = time();
		return R::store($this->unbox());
	}

	public function setSent() {
		$this->unbox()->status = self::STATUS_SENT;
		$this->unbox()->sendfinished = time();
		return R::store($this->unbox());
	}

}
