<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');


class Freelance extends CI_Model

{

    public function __construct()
    {
        $this->db = $this->load->database('bizba_e_commerce', True);
    }


    public function asIamHired($id)
    {
        $jobs = $this->db->query("SELECT job_posts.*,job_categories.name as category,job_bids.amount as bid_amount,job_bids.status as isClosed,job_bids.id as job_bid_id FROM job_bids INNER JOIN job_posts ON job_posts.id = job_bids.job_post_id INNER JOIN job_categories ON job_posts.job_category_id=job_categories.id where  job_bids.merchant_id=$id AND job_bids.status=1");
        return $jobs->result();
    }

}