EmailTriggerOnChange / workflowschema.py
SoumyaJ's picture
Upload 5 files
79ff0e6 verified
from pydantic import BaseModel, Field
from typing import List,Literal,Any
class LibraryModel(BaseModel):
name: str = Field(..., description="Name of the module that has changed")
action: Literal["added", "removed", "modified"] = Field(..., description="Action performed on that module", examples=["added", "removed", "modified"])
change_type: str = Field(..., description="The field or the data that has changed in the module")
changed_by: str = Field(..., description="The user who made the change")
timestamp: str = Field(..., description="Timestamp of the change in ISO format")
change_id: int = Field(..., description="Unique identifier for the change in the module")
change_from: Any = Field(..., description="The previous value of the field that has changed")
change_to: Any = Field(..., description="The new value of the field that has changed")
title: str = Field(..., description="Title of the module that has changed")
unique_identifier: Literal["library","scheduling"] = Field(..., description="Info about the module that has changed", examples=["library", "scheduling"])