<?php

class Invoice_pay_model extends MY_Model
{
    public $table;
    public $tbl;

    public function __construct()
    {
        parent::__construct();

        $this->database = $this->getTenantNo();
        $this->tbl = 'invoicing_invoice_atmpay';
    }

    public function create($params)
    {
        $params['id'] = $this->insertDB($this->database, $this->tbl, $params);
        return $params;
    }

    public function submit($invoiceId, $studentId, $filename, $type)
    {
        return $this->create([
            'invoice_id' => $invoiceId,
            'student_id' => $studentId,
            'filename' => $filename,
            'type' => $type,
            'create_time' => time()
        ]);
    }
}
