2022-01-22 21:27:52 +00:00
|
|
|
from sqlalchemy import *
|
|
|
|
from files.__main__ import Base
|
2022-09-12 10:19:35 +00:00
|
|
|
import time
|
2022-01-22 21:27:52 +00:00
|
|
|
|
|
|
|
class Marsey(Base):
|
|
|
|
__tablename__ = "marseys"
|
|
|
|
|
|
|
|
name = Column(String, primary_key=True)
|
2022-01-23 23:06:34 +00:00
|
|
|
author_id = Column(Integer, ForeignKey("users.id"))
|
|
|
|
tags = Column(String)
|
|
|
|
count = Column(Integer, default=0)
|
2022-09-09 09:13:50 +00:00
|
|
|
submitter_id = Column(Integer, ForeignKey("users.id"))
|
2022-09-19 19:24:16 +00:00
|
|
|
created_utc = Column(Integer, default=int(time.time()))
|
2022-01-22 21:27:52 +00:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return f"<Marsey(name={self.name})>"
|