<?php 
namespace app\common\model;
use think\Model;
class ResumeWorks extends Model
{
	public static function getResumeWorks($resume_id)
	{
		$Model=self::where(['resume_id'=>$resume_id])->field('id,title,path,status,create_time')->select()->toArray();
		$Data=[];
		foreach ($Model as $k => $v) {
			$Data[$k]=$v;
			$Data[$k]['create_time']=date('Y-m-d',strtotime($v['create_time']));
			$Data[$k]['url']=config('web.imgurl').$v['path'];
			$Data[$k]['visible']=0;
		}
		return $Data;
	}
	public static function getResumeWorksIsExamine($resume_id)
	{
		$Model=self::where(['resume_id'=>$resume_id,'status'=>1])->field('id,title,path,status,create_time')->select()->toArray();
		$Data=[];
		foreach ($Model as $k => $v) {
			$Data[$k]=$v;
			$Data[$k]['create_time']=date('Y-m-d',strtotime($v['create_time']));
			$Data[$k]['url']=config('web.imgurl').$v['path'];
			$Data[$k]['visible']=0;
		}
		return $Data;
	}
}