<?php
/**
* @author 龙虾 <15108148@qq.com>
* @version 2.0 2020-08-06
* @copyright 睿谷信息 <www.rgxx.com>
*/
namespace app\common\model;
use think\Model as Basemodel;

class Media extends Basemodel
{
	public function getSizeAttr($value)
    {
        return format_bytes($value);
    }
    public function getTypeAttr($value)
    {
        switch ($value) {
        	case 'image':
        		return '图片';
        		break;
        	case 'file':
        		return '文件';
        		break;
        	case 'video':
        		return '视频';
        		break;
            case 'remote':
                return '远程抓图';
                break;
        	default:
        		return '其他';
        		break;
        }
    }
}