ECO-171: fix comments

This commit is contained in:
Charles Yao 2025-11-20 23:08:00 -06:00
parent 153609b968
commit bbd466eaba

View File

@ -123,27 +123,24 @@ class EndUserAuthenticationProvider(TypeBase):
__tablename__ = "tool_enduser_authentication_providers" __tablename__ = "tool_enduser_authentication_providers"
__table_args__ = ( __table_args__ = (
sa.PrimaryKeyConstraint("id", name="tool_enduser_authentication_provider_pkey"),
sa.UniqueConstraint("tenant_id", "provider", "end_user_id", "name", name="unique_enduser_authentication_provider"), sa.UniqueConstraint("tenant_id", "provider", "end_user_id", "name", name="unique_enduser_authentication_provider"),
sa.Index("tool_enduser_authentication_provider_tenant_id_idx", "tenant_id"),
sa.Index("tool_enduser_authentication_provider_end_user_id_idx", "end_user_id"),
) )
# id of the authentication provider # id of the authentication provider
id: Mapped[str] = mapped_column(StringUUID, default=uuidv7, init=False) id: Mapped[str] = mapped_column(StringUUID, primary_key=True, default=uuidv7, init=False)
name: Mapped[str] = mapped_column( name: Mapped[str] = mapped_column(
String(256), String(256),
nullable=False, nullable=False,
default="API KEY 1", default="API KEY 1",
) )
# id of the tenant # id of the tenant
tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False) tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False, index=True)
# id of the end user # id of the end user
end_user_id: Mapped[str] = mapped_column(StringUUID, nullable=False) end_user_id: Mapped[str] = mapped_column(StringUUID, nullable=False, index=True)
# name of the tool provider # name of the tool provider
provider: Mapped[str] = mapped_column(String(256), nullable=False) provider: Mapped[str] = mapped_column(sa.Text, nullable=False)
# encrypted credentials for the end user # encrypted credentials for the end user
encrypted_credentials: Mapped[str | None] = mapped_column(sa.Text, nullable=True, default=None) encrypted_credentials: Mapped[str] = mapped_column(sa.Text, nullable=False, default="")
created_at: Mapped[datetime] = mapped_column( created_at: Mapped[datetime] = mapped_column(
sa.DateTime, nullable=False, default=datetime.now, init=False sa.DateTime, nullable=False, default=datetime.now, init=False
) )