<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class OrganizationVaccine extends Model
{

    const FREETYPE = 1, NOFREETYPE =2;

    protected static $_type = [
        self::FREETYPE => 'Ⅰ类',
        self::NOFREETYPE => 'Ⅱ类',
    ];

    public static function getType(){
        return self::$_type;
    }
    public function organization()
    {
        return $this->hasOne(Organization::class,'id','org_id');
    }

    public function vaccine()
    {
        return $this->hasOne(Vaccine::class,'id','vaccine_id');
    }
}
