<?php

class StranasNewCommentAttachment extends \Phalcon\Mvc\Model
{

    /**
     * Initialize method for model.
     */
    public function initialize() {
        $this->setSchema("jaga");
        $this->setSource("str_target_comment_attachment");
        $this->hasOne("id_attachment", "Attachments", "id");
    }

    public function getDetail()
    {
        return $this->Attachments->toArray(['uuid', 'filename', 'keterangan', 'tipe']);
    }
    public function toArray($columns = null)
    {
        $result = parent::toArray($columns);
        $result = $this->Attachments;

        return $result;
    }
}
