feat: indie status page SaaS - initial release
This commit is contained in:
parent
ee2bc87ade
commit
b7a8142ca0
14 changed files with 2703 additions and 0 deletions
|
|
@ -15,6 +15,9 @@ class Service(Base):
|
|||
__tablename__ = "services"
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=_uuid_str)
|
||||
organization_id: Mapped[str | None] = mapped_column(
|
||||
String(36), ForeignKey("organizations.id"), nullable=True, index=True
|
||||
)
|
||||
name: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
slug: Mapped[str] = mapped_column(String(50), unique=True, nullable=False, index=True)
|
||||
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
|
|
@ -74,6 +77,9 @@ class Monitor(Base):
|
|||
__tablename__ = "monitors"
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=_uuid_str)
|
||||
organization_id: Mapped[str | None] = mapped_column(
|
||||
String(36), ForeignKey("organizations.id"), nullable=True, index=True
|
||||
)
|
||||
service_id: Mapped[str] = mapped_column(
|
||||
String(36), ForeignKey("services.id"), nullable=False, index=True
|
||||
)
|
||||
|
|
@ -114,6 +120,9 @@ class Subscriber(Base):
|
|||
__tablename__ = "subscribers"
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=_uuid_str)
|
||||
organization_id: Mapped[str | None] = mapped_column(
|
||||
String(36), ForeignKey("organizations.id"), nullable=True, index=True
|
||||
)
|
||||
email: Mapped[str] = mapped_column(String(255), unique=True, nullable=False, index=True)
|
||||
is_confirmed: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
confirm_token: Mapped[str | None] = mapped_column(String(100), nullable=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue