<?php

namespace RadiusTheme\RadiusBooking\Models;

use RadiusTheme\RadiusBooking\Abstracts\BaseModel;
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
/**
 * Class AppointmentIntegration
 *
 * @package RadiusTheme\RadiusBooking\Models
 *
 * @property int    $id
 * @property string $name
 */
class AppointmentIntegration extends BaseModel {

	/**
	 * The database table associated with the model.
	 *
	 * @var string
	 */
	protected string $table = 'radius_booking_appointment_integrations';

	/**
	 * The attributes that are mass assignable.
	 *
	 * @var array
	 */
	protected array $fillable = array(
		'appointment_id',
		'provider',
		'external_event_id',
		'external_calendar_id',
		'meeting_url',
		'join_url',
		'start_url',
		'meta',
		'status',
	);

	/**
	 * Define relationship with Appointment model
	 */
	public function appointment() {
		return $this->belongsTo( Appointment::class, 'appointment_id' );
	}
}
