class BankTransaction(db.Model): __tablename__ = 'bank_transactions' url = db.Column(db.String(), nullable=False, primary_key=True) bank_account = db.Column(db.String(), nullable=False) amount = db.Column(db.Numeric(precision=10, scale=2)) dated_on = db.Column(db.Date()) description = db.Column(db.String()) full_description = db.Column(db.String()) is_manual = db.Column(db.Boolean()) unexplained_amount = db.Column(db.Numeric(precision=10, scale=2)) uploaded_at = db.Column(db.Date()) created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) def __init__(self, created_at=datetime.now(), updated_at=datetime.now(), **kwargs): """Mostly rely on default declarative SQLAlchemy constructor. Additionally set the timestamps on object creation.""" super( BankTransaction, self).__init__(**kwargs) # use the default declarative constructor self.created_at = created_at self.updated_at = updated_at def __repr__(self): return '<url {}>'.format(self.url)
class Bill(db.Model): __tablename__ = 'bills' url = db.Column(db.String(), nullable=False, primary_key=True) category = db.Column(db.String(), nullable=False) project = db.Column(db.String()) comments = db.Column(db.String()) contact = db.Column(db.String()) dated_on = db.Column(db.Date()) due_on = db.Column(db.Date()) due_value = db.Column(db.Numeric(precision=10, scale=2)) paid_value = db.Column(db.Numeric(precision=10, scale=2)) reference = db.Column(db.String()) sales_tax_rate = db.Column(db.Numeric(precision=10, scale=2)) sales_tax_value = db.Column(db.Numeric(precision=10, scale=2)) status = db.Column(db.String()) total_value = db.Column(db.Numeric(precision=10, scale=2)) created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) def __init__(self, created_at=datetime.now(), updated_at=datetime.now(), **kwargs): """Mostly rely on default declarative SQLAlchemy constructor. Additionally set the timestamps on object creation.""" super( Bill, self).__init__(**kwargs) # use the default declarative constructor self.created_at = created_at self.updated_at = updated_at def __repr__(self): return '<url {}>'.format(self.url)
class Invoice(db.Model): __tablename__ = 'invoices' url = db.Column(db.String(), nullable=False, primary_key=True) always_show_bic_and_iban = db.Column(db.Boolean()) comments = db.Column(db.String()) contact = db.Column(db.String()) currency = db.Column(db.String()) dated_on = db.Column(db.Date()) discount_percent = db.Column(db.Numeric(precision=10, scale=2)) due_on = db.Column(db.Date()) due_value = db.Column(db.Numeric(precision=10, scale=2)) exchange_rate = db.Column(db.Numeric(precision=10, scale=2)) involves_sales_tax = db.Column(db.Boolean()) is_interim_uk_vat = db.Column(db.Boolean()) net_value = db.Column(db.Numeric(precision=10, scale=2)) omit_header = db.Column(db.Boolean()) paid_on = db.Column(db.Date()) paid_value = db.Column(db.Numeric(precision=10, scale=2)) payment_terms_in_days = db.Column(db.Integer()) po_reference = db.Column(db.String()) project = db.Column(db.String()) reference = db.Column(db.String()) sales_tax_value = db.Column(db.Numeric(precision=10, scale=2)) show_project_name = db.Column(db.Boolean()) status = db.Column(db.String()) total_value = db.Column(db.Numeric(precision=10, scale=2)) written_off_date = db.Column(db.Date()) send_reminder_emails = db.Column(db.Boolean()) send_thank_you_emails = db.Column(db.Boolean()) send_new_invoice_emails = db.Column(db.Boolean()) include_timeslips = db.Column(db.String()) recurring_invoice = db.Column(db.String()) billed_grouped_by_single_timeslip = db.Column(db.Boolean()) bank_account = db.Column(db.String()) client_contact_name = db.Column(db.String()) created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) def __init__(self, created_at=datetime.now(), updated_at=datetime.now(), **kwargs): """Mostly rely on default declarative SQLAlchemy constructor. Additionally set the timestamps on object creation.""" super( Invoice, self).__init__(**kwargs) # use the default declarative constructor self.created_at = created_at self.updated_at = updated_at def __repr__(self): return '<url {}>'.format(self.url)
class Expense(db.Model): __tablename__ = 'expenses' url = db.Column(db.String(), nullable=False, primary_key=True) category = db.Column(db.String()) currency = db.Column(db.String()) dated_on = db.Column(db.Date()) description = db.Column(db.String()) gross_value = db.Column(db.Numeric(precision=10, scale=2)) manual_sales_tax_amount = db.Column(db.Numeric(precision=10, scale=2)) native_gross_value = db.Column(db.Numeric(precision=10, scale=2)) native_sales_tax_value = db.Column(db.Numeric(precision=10, scale=2)) project = db.Column(db.String()) receipt_reference = db.Column(db.String()) sales_tax_rate = db.Column(db.Numeric(precision=10, scale=2)) sales_tax_value = db.Column(db.Numeric(precision=10, scale=2)) user = db.Column(db.String()) rebill_factor = db.Column(db.Numeric(precision=10, scale=2)) created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) def __init__(self, created_at=datetime.now(), updated_at=datetime.now(), **kwargs): """Mostly rely on default declarative SQLAlchemy constructor. Additionally set the timestamps on object creation.""" super(Expense, self).__init__(**kwargs) # use the default declarative constructor self.created_at = created_at self.updated_at = updated_at def __repr__(self): return '<url {}>'.format(self.url)
class BankTransactionExplanation(db.Model): __tablename__ = 'bank_transaction_explanations' url = db.Column(db.String(), nullable=False, primary_key=True) bank_transaction = db.Column(db.String(), nullable=False) bank_account = db.Column(db.String(), nullable=False) category = db.Column(db.String()) dated_on = db.Column(db.Date()) description = db.Column(db.String()) gross_value = db.Column(db.Numeric(precision=10, scale=2)) paid_bill = db.Column(db.String()) paid_invoice = db.Column(db.String()) paid_user = db.Column(db.String()) receipt_reference = db.Column(db.String()) sales_tax_rate = db.Column(db.Numeric(precision=10, scale=2)) created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) def __init__(self, created_at=datetime.now(), updated_at=datetime.now(), **kwargs): """Mostly rely on default declarative SQLAlchemy constructor. Additionally set the timestamps on object creation.""" super(BankTransactionExplanation, self).__init__(**kwargs) # use the default declarative constructor self.created_at = created_at self.updated_at = updated_at def __repr__(self): return '<url {}>'.format(self.url)