mirror of
https://github.com/solero/houdini.git
synced 2024-11-21 21:17:21 +00:00
New sound studio data models
This commit is contained in:
parent
2825ad00ab
commit
f139f7fe24
22
Houdini/Data/Music.py
Normal file
22
Houdini/Data/Music.py
Normal file
@ -0,0 +1,22 @@
|
||||
from Houdini.Data import db
|
||||
|
||||
|
||||
class PenguinTrack(db.Model):
|
||||
__tablename__ = 'penguin_track'
|
||||
|
||||
ID = db.Column(db.Integer, primary_key=True,
|
||||
server_default=db.text("nextval('\"penguin_track_ID_seq\"'::regclass)"))
|
||||
Name = db.Column(db.String(12), nullable=False, server_default=db.text("''::character varying"))
|
||||
OwnerID = db.Column(db.ForeignKey('penguin.ID', ondelete='CASCADE', onupdate='CASCADE'), nullable=False)
|
||||
Sharing = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
Pattern = db.Column(db.Text, nullable=False)
|
||||
|
||||
|
||||
class TrackLike(db.Model):
|
||||
__tablename__ = 'track_like'
|
||||
|
||||
PenguinID = db.Column(db.ForeignKey('penguin.ID', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
TrackID = db.Column(db.ForeignKey('penguin_track.ID', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False, index=True)
|
||||
Date = db.Column(db.DateTime, primary_key=True, nullable=False)
|
Loading…
Reference in New Issue
Block a user