new api service and logic implemented
This commit is contained in:
31
ApiLayers/Schemas/rules/rules.py
Normal file
31
ApiLayers/Schemas/rules/rules.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from sqlalchemy import String
|
||||
from sqlalchemy.orm import mapped_column, Mapped
|
||||
|
||||
from LanguageModels.Database.rules.rules import EndpointRestrictionLanguageModel
|
||||
from Services.PostgresDb import CrudCollection
|
||||
|
||||
|
||||
class EndpointRestriction(CrudCollection):
|
||||
"""
|
||||
Initialize Endpoint Restriction with default values
|
||||
"""
|
||||
|
||||
__tablename__ = "endpoint_restriction"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = EndpointRestrictionLanguageModel
|
||||
|
||||
endpoint_function: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Function name of the API endpoint"
|
||||
)
|
||||
endpoint_name: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Name of the API endpoint"
|
||||
)
|
||||
endpoint_method: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="HTTP method used by the endpoint"
|
||||
)
|
||||
endpoint_desc: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Description of the endpoint"
|
||||
)
|
||||
endpoint_code: Mapped[str] = mapped_column(
|
||||
String, server_default="", unique=True, comment="Unique code for the endpoint"
|
||||
)
|
||||
Reference in New Issue
Block a user