<?php

/**
 * Description of Payment_refund_model
 *
 * @author Md Jaherul Islam
 */
class Payment_refund_model extends CI_Model {

    const primary_key = 'payment_refund_id';
    const tbl_name = 'tbl_payment_refund';

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

    private $payment_id;

    function set_payment_id($payment_id) {
        $this->payment_id = $payment_id;
        return $this;
    }

    private $refund_type;

    function set_refund_type($refund_type) {
        $this->refund_type = $refund_type;
        return $this;
    }

    private $refund_type_id;

    function set_refund_type_id($refund_type_id) {
        $this->refund_type_id = $refund_type_id;
        return $this;
    }

    private $refund_amount;

    function set_refund_amount($refund_amount) {
        $this->refund_amount = $refund_amount;
        return $this;
    }

    function save() {
        $data = [];
        $data['payment_id'] = $this->payment_id;
        $data['payment_refund_type'] = $this->refund_type;
        $data['payment_refund_type_id'] = $this->refund_type_id;
        $data['payment_refund_amount'] = $this->refund_amount;
        $this->db->insert(self::tbl_name, $data);
    }

}
