Goon — self-hosted aggregator for adult-content scene metadata. Indexes scenes from TPDB, StashDB, and 30+ public adult tube sites. Cross-source deduplication via perceptual hash + Levenshtein distance. FastAPI backend + APScheduler worker + React Native (Expo) mobile client. FOSS, ad-free, donation-funded. See README for details.
18 lines
642 B
Python
18 lines
642 B
Python
import uuid
|
|
|
|
from sqlalchemy import ForeignKey, String
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.models.base import Base, TimestampMixin, UUIDPKMixin
|
|
|
|
|
|
class Tag(UUIDPKMixin, TimestampMixin, Base):
|
|
__tablename__ = "tags"
|
|
|
|
name: Mapped[str] = mapped_column(String(128), nullable=False)
|
|
slug: Mapped[str] = mapped_column(String(128), nullable=False, unique=True)
|
|
parent_tag_id: Mapped[uuid.UUID | None] = mapped_column(
|
|
UUID(as_uuid=True), ForeignKey("tags.id", ondelete="SET NULL")
|
|
)
|
|
description: Mapped[str | None] = mapped_column(String(1024))
|