Collector/models/album.py

16 lines
383 B
Python
Raw Permalink Normal View History

2025-05-30 21:20:55 +00:00
# models/album.py
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Album(Base):
__tablename__ = 'albums'
id = Column(Integer, primary_key=True)
title = Column(String(255), nullable=False)
artist = Column(String(255), nullable=False)
year = Column(Integer, nullable=False)