"""ORM model for artists."""

from sqlalchemy import String
from sqlalchemy.orm import Mapped, mapped_column

from app.infrastructure.db.base import Base
from app.infrastructure.db.models.mixins import TimestampMixin, UUIDPrimaryKeyMixin


class ArtistModel(UUIDPrimaryKeyMixin, TimestampMixin, Base):
    __tablename__ = "artists"

    name: Mapped[str] = mapped_column(String(512), index=True, nullable=False)
    musicbrainz_id: Mapped[str | None] = mapped_column(String(36), index=True, nullable=True)
