<?php

class StranasTargetAnswerComment extends \Phalcon\Mvc\Model
{

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("stranas_survey_answer_comment");
        $this->hasMany("id", "StranasTargetCommentWithAttachment", "id_comment");
    }

    
    public function toArray($columns = null)
    {
        $result = parent::toArray($columns);
        $result['attachments'] = $this->StranasTargetCommentWithAttachment;

        return $result;
    }

    // public function toArray($columns = null)
    // {
    //     $result = parent::toArray($columns);
    //     $result['files'] = $this->StranasSurveyAnswerCommentAttachment;

    //     return $result;
    // }
}


