<?php

use Jaga\Models\BaseModel;

class LogAttachments extends BaseModel {
    public $source_name;
    public $bucket_name;
    public $key_path;
    public $modul_name;
    public $status;
    public $created_at;

    const AttachmentAsetPajak           = "AttachmentAsetPajak";
    const CommentAttachment             = "CommentAttachment";
    const DiskusiAttachment             = "DiskusiAttachment";
    const KorsupgahAnswerAttachment     = "KorsupgahAnswerAttachment";
    const PAKImplementasiAttachment     = "PAKImplementasiAttachment";
    const PAKIsianSekolahAttachment     = "PAKIsianSekolahAttachment";
    const PancekAnswerAttachment        = "PancekAnswerAttachment";
    const PancekKomponenTemplate        = "PancekKomponenTemplate";
    const ProfilePicture                = "ProfilePicture";
    const SPIMonitoringAttachment       = "SPIMonitoringAttachment";

    public function initialize()
    {
        $this->setSchema("jaga");
        $this->setSource("log_attachments");
    }

    public static function insert(
        $source_name,
        $bucket_name,
        $key_path,
        $modul_name,
        $status
    ) {
        $row = new LogAttachments();
        $row->source_name = $source_name;
        $row->bucket_name = $bucket_name;
        $row->key_path = $key_path;
        $row->status = $status;
        $row->modul_name = $modul_name;
        $row->save();
    }
}
