<?php

/**
 * @property DesaKegiatanPenyerapan $kegiatan
 */
class DesaUraianOutputPenyerapan extends \Phalcon\Mvc\Model
{

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

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

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

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("desa_uraian_output_penyerapan");
        $this->hasMany('kode', 'OmspanPenyerapanDanaDesa', 'kode_uraian_output', ['alias' => 'penyerapan']);
        $this->belongsTo('kode_kegiatan', '\DesaKegiatanPenyerapan', 'kode', ['alias' => 'kegiatan']);
    }

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

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return DesaUraianOutputPenyerapan[]|DesaUraianOutputPenyerapan|\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 DesaUraianOutputPenyerapan|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
