<?php

class DiskusiMentionUser extends \Phalcon\Mvc\Model
{

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

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

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

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

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

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

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

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

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("diskusi_mention_user");
        $this->belongsTo('user_id', '\UmUser', 'um_id', ['alias' => 'UmUser']);
        $this->belongsTo('user_mentioned_id', '\UmUser', 'um_id', ['alias' => 'UmUser']);
        $this->belongsTo('diskusi_id', '\Diskusi', 'id', ['alias' => 'Diskusi']);
    }

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

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

}
