<?php

namespace Hilco\Models;

/**
 * Hilco\Models\HubspotCustomEvent
 * @property-read string $event_name
 * @property-read string $internal_id
 */
class HubspotCustomEvent extends WebModel {
    protected $table = 'HubspotCustomEvents';

    public static function findByEventName (string $eventName) {
        return HubspotCustomEvent::where('event_name', '=', $eventName)->first();
    }

    public function getInternalId() {
        return $this->internal_id ?? "";
    }
}