distribusi-verse/verse/models/distribusi_file_model.py

19 lines
705 B
Python
Raw Normal View History

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