<?

namespace Diamond\Repositories;

/**
 * Description of MailingTemplate
 *
 * @author Admin
 */
class Mailing extends \Core\Repository\PropelQueryAbstract implements \Core\Repository\CrudInterface, \Core\Repository\DropDownInterface
{
    public function buildEntity()
    {
        return new \Diamond\Infrastructure\Models\Mailing\Mailing;
    }

    public function buildQuery()
    {
        return \Diamond\Infrastructure\Models\Mailing\MailingQuery::create();
    }
    public function getDropdownList():array
    {
        return $this->buildQuery()
		->orderById()
		->find()
		->toKeyValue('id','name');
    }
    
    /**
     * 
     * @param type $id
     * @return \Diamond\Infrastructure\Models\Mailing\Mailing
     */
    public function findById($id){
        return parent::findById($id);
    }

}