2024-04-28 15:34:29 +02:00
|
|
|
from app import db
|
|
|
|
|
|
|
|
|
|
|
|
class DistribusiFiles(db.Model):
|
2024-05-28 23:02:17 +02:00
|
|
|
"""Distribusi file model class for a single file in a distribusi"""
|
2024-04-28 15:34:29 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
__tablename__ = "distribusi_files"
|
2024-04-28 15:34:29 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
|
|
type = db.Column(db.String(100), nullable=True, unique=False)
|
|
|
|
distribusi = db.Column(db.Integer, db.ForeignKey("distribusis.id"))
|
2024-06-17 23:06:51 +02:00
|
|
|
path = db.Column(db.String(4096), nullable=True, unique=True)
|
2024-05-28 23:02:17 +02:00
|
|
|
alttext = db.Column(db.String(255), nullable=True, unique=False)
|
|
|
|
tags = db.Column(db.String(500), nullable=True, unique=False)
|
|
|
|
description = db.Column(db.String(4096), nullable=True, unique=False)
|
2024-04-28 15:34:29 +02:00
|
|
|
|
2024-05-28 23:02:17 +02:00
|
|
|
def __repr__(self):
|
|
|
|
return "<Distribusi_File %r>" % self.path
|