from flask_restx import Resource, Namespace, fields

api = Namespace("status", "[Server Status] Check Server Status")

standard_response = api.model("standard_response", {
    "status": fields.String,
    "message": fields.String
})


@api.route("/")
class ServerStatus(Resource):
    @staticmethod
    @api.marshal_with(standard_response)
    def get():
        return {
            "status": "success",
            "message": "The server is running."
        }
