<?php

class KipArea2017 extends \Phalcon\Mvc\Model
{

    /**
     *
     * @var integer
     */
    public $id;

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

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

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

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

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

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

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

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("kip_area_2017");
        $this->belongsTo('kecamatan_code', '\MasterKecamatan', 'kecamatan_code', ['alias' => 'MasterKecamatan']);
    }

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

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

}
