<?php

class DesaBidangPenyerapan extends \Phalcon\Mvc\Model
{

    /**
     *
     * @var string
     */
    public $kode;

    /**
     *
     * @var string
     */
    public $nama;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("desa_bidang_penyerapan");
        $this->hasMany('kode', 'DesaKegiatanPenyerapan', 'kode_bidang', ['alias' => 'kegiatan']);
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'desa_bidang_penyerapan';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return DesaBidangPenyerapan[]|DesaBidangPenyerapan|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return DesaBidangPenyerapan|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
