<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TextBroadcast extends Model
{
    protected $fillable = ['template_id', 'content', 'target_type'];

    public function rooms()
    {
        return $this->belongsToMany(Room::class, 'text_broadcast_room');
    }

    public function template()
    {
        return $this->belongsTo(BroadcastTemplate::class);
    }
}
