mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-04-30 01:09:42 -05:00
90dde470da
- Normalize line endings from CRLF to LF across all files to match .editorconfig - Standardize quote style from single quotes to double quotes - Normalize whitespace and formatting throughout codebase - Apply consistent code style across 372 files including: * Application code (models, routes, services, utils) * Test files * Configuration files * CI/CD workflows This ensures consistency with the project's .editorconfig settings and improves code maintainability.
22 lines
809 B
Python
22 lines
809 B
Python
from datetime import datetime
|
|
from app import db
|
|
|
|
|
|
class InvoiceTemplate(db.Model):
|
|
"""Reusable invoice templates/themes with customizable HTML and CSS."""
|
|
|
|
__tablename__ = "invoice_templates"
|
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
name = db.Column(db.String(100), nullable=False, unique=True, index=True)
|
|
description = db.Column(db.String(255), nullable=True)
|
|
html = db.Column(db.Text, nullable=True)
|
|
css = db.Column(db.Text, nullable=True)
|
|
is_default = db.Column(db.Boolean, default=False, nullable=False)
|
|
|
|
created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
|
|
updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
|
|
|
|
def __repr__(self):
|
|
return f"<InvoiceTemplate {self.name}>"
|