<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Shippingnetnews extends Model
{
    protected $table = 'shippingnetnews';
    public $timestamps = false;
    protected $primaryKey = 'shippingnetnews_ID';
    protected $fillable = [
        'shippingnetnews_ID',
        'groupID',
        'description',
        'content',
        'issueDate',
        'expireDate',
        'authorDate',
        'topic',
        'newstype', 
        'uploadFilePathName1',
        'uploadFilePathName2',
        'uploadFileName1',
        'uploadFileName2',
        'topiccolor',
    ];


    public function group() {
       return $this->belongsTo(Shippingnetservergroup::class, 'groupID', 'groupID');
    }

    public function type() {
        return $this->belongsTo(Shippingnetnewstype::class, 'id', 'newstype');
     }
}
