update
This commit is contained in:
28
app/sql_models.py
Normal file
28
app/sql_models.py
Normal file
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user