You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Adunatio/models/Payment.py

27 lines
868 B

from mongoengine import *
from models.Account import Account
from models.File import File
from models.Union import Union
from models.User import User
class Payments(Document):
"""
all payments income and outcome together!
"""
union = ReferenceField(Union)
user = ReferenceField(User, required=True)
income = BooleanField(default=False)
date = DateTimeField()
regular = BooleanField(default=False)
regular_type = StringField(choices=('Weekly', 'Monthly', 'Yearly'))
price = DecimalField(required=True)
deleted = BooleanField(default=False)
description = StringField()
reference_no = StringField()
file = ReferenceField(File)
account = ReferenceField(Account, required=True)
due_date = DateTimeField()
is_paid = BooleanField(default=False, required=True)
is_donate = BooleanField(default=False)