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.
|
|
|
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)
|
|
|
|
income = BooleanField(default=False)
|
|
|
|
date = DateTimeField()
|
|
|
|
regular = BooleanField(default=False)
|
|
|
|
regular_type = StringField(choices=('Weekly','Monthly','Yearly'))
|
|
|
|
price = DecimalField()
|
|
|
|
deleted = BooleanField(default=False)
|
|
|
|
description = StringField()
|
|
|
|
reference_no = StringField()
|
|
|
|
file = ReferenceField(File)
|
|
|
|
account = ReferenceField(Account)
|
|
|
|
due_date = DateTimeField()
|
|
|
|
is_paid = BooleanField(default=False)
|
|
|
|
is_donate = BooleanField(default=False)
|
|
|
|
|
|
|
|
|