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):
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"))
path = db.Column(db.String(4096), nullable=True, unique=False)
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