Skip to content
Discussion options

You must be logged in to vote
from sqlmodel import Field, Column, SQLModel
from sqlalchemy.dialects.postgresql import JSONB

class AlertBase(SQLModel):
    name: str = Field(nullable=False, description="The name of alert", max_length=56)
    title: str = Field(nullable=True, description="The title of alert", max_length=100)
    labels: dict = Field(sa_column=Column(JSONB))

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants