from typing import Optional, List
from sqlmodel import SQLModel, Field, Relationship


class SongBase(SQLModel):
    name: str
    artist: str
    year: Optional[int] = None


class Song(SongBase, table=True):
    id: int = Field(primary_key=True)
class SongRead(SongBase):
    id: int


class SongCreate(SongBase):
    pass

class Increment(SQLModel, table=True):
    id: int = Field(primary_key=True)


# #############################################################################
class ListingBase(SQLModel):
    url: str
    
class Listing(ListingBase, table=True):
    __tablename__ = 'listings'
    id: int = 