<?php

namespace Planaday\Utility\Endpoints;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_FUNCTION|Attribute::IS_REPEATABLE)]
class ApiEndpoint {
	/**
	 * @param string $route route variables can be placed by using regex named groups, e.g. /(?<id>\d+)
	 * @param RequestMethod $method
	 */
	public function __construct(
		public string $route,
		public RequestMethod $method = RequestMethod::GET
	){}
}