28 lines
745 B
Python
28 lines
745 B
Python
from sqlalchemy import Column, String, Integer, Boolean, PickleType, Enum
|
|
from sqlalchemy.orm import declarative_base
|
|
from typing import Optional
|
|
|
|
Base = declarative_base()
|
|
|
|
class SqlSong(Base):
|
|
__tablename__ = 'songs'
|
|
id = Column(Integer, primary_key=True)
|
|
og_artist = Column(String)
|
|
aca_artist = Column(String)
|
|
title = Column(String)
|
|
yt_url = Column(String)
|
|
is_aca = Column(Boolean)
|
|
arng_url = Column(String)
|
|
|
|
categories = Column(PickleType)
|
|
|
|
main_category = Column(String)
|
|
|
|
singable = Column(Boolean)
|
|
|
|
class SqlVote(Base):
|
|
__tablename__ = 'votes'
|
|
id = Column(Integer, primary_key=True)
|
|
song_id = Column(Integer)
|
|
user_id = Column(String)
|
|
vote = Column(Integer, nullable=True) |