2024-04-21 20:44:08 +02:00
|
|
|
from app import db
|
|
|
|
|
|
|
|
|
|
|
|
class Distribusis(db.Model):
|
2024-05-28 23:02:17 +02:00
|
|
|
"""distribusi model class for a single distribusi in distribusi-verse"""
|
2024-04-21 20:44:08 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
__tablename__ = "distribusis"
|
2024-04-21 20:44:08 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
|
|
distribusiname = db.Column(db.String(300), nullable=False, unique=True)
|
|
|
|
userid = db.Column(db.Integer, db.ForeignKey("users.id"))
|
|
|
|
category = db.Column(db.String(500), nullable=True, unique=False)
|
|
|
|
year = db.Column(db.String(9), nullable=True, unique=False)
|
2024-06-17 22:36:23 +02:00
|
|
|
description = db.Column(db.String(32000), nullable=True, unique=False)
|
2024-05-28 23:02:17 +02:00
|
|
|
tags = db.Column(db.String(500), nullable=True, unique=False)
|
|
|
|
publictheme = db.Column(db.String(300), unique=True, nullable=True)
|
|
|
|
visible = db.Column(db.Boolean, default=False)
|
2024-04-21 20:44:08 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
def __repr__(self):
|
|
|
|
return "<Distribusi %r>" % self.distribusiname
|