<?php

namespace Kylin\Activity\Exceptions;

use Exception;
use Illuminate\Database\Eloquent\Model;
use Kylin\Activity\Contracts\Activity;

/**
 * 无效配置异常
 *
 * 当活动日志模型配置无效时抛出。
 */
class InvalidConfiguration extends Exception
{
    public static function modelIsNotValid(string $className): self
    {
        return new static("The given model class `{$className}` does not implement `".Activity::class.'` or it does not extend `'.Model::class.'`');
    }
}
