add web
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from app.extensions import db
|
||||
from datetime import datetime
|
||||
|
||||
class PreviouslyPlayed(db.Model):
|
||||
id = db.Column(db.BigInteger, primary_key=True, autoincrement=True, unique=True)
|
||||
userid = db.Column(db.BigInteger, nullable=False, index=True)
|
||||
lastplayed = db.Column(db.DateTime, nullable=False)
|
||||
placeid = db.Column(db.BigInteger, nullable=False, index=True)
|
||||
|
||||
def __init__(self, userid, placeid):
|
||||
self.userid = userid
|
||||
self.placeid = placeid
|
||||
self.lastplayed = datetime.utcnow()
|
||||
|
||||
def __repr__(self):
|
||||
return f"<PreviouslyPlayed {self.userid} {self.placeid} {self.lastplayed}>"
|
||||
Reference in New Issue
Block a user