Commit c6c9dd64 authored by Maxime Pommier's avatar Maxime Pommier Committed by Romain Bignon

[] Add the relationship between the credentials owner (PSU) and the account

For now, there are three values:
 - owner: The PSU own the account
 - co-owner: There are at least 2 owners on this account
 - attorney: It's not the PSU property, but it can manage it (ex: It's children accounts)
parent 5a2f6012
......@@ -36,7 +36,7 @@ from .collection import CapCollection
__all__ = [
'CapBank', 'BaseAccount', 'Account', 'Loan', 'Transaction', 'AccountNotFound',
'AccountType', 'AccountOwnership',
'CapBankWealth', 'Investment', 'CapBankPockets', 'Pocket',
'CapBankTransfer', 'Transfer', 'Recipient',
'TransferError', 'TransferBankError', 'TransferInvalidAmount', 'TransferInsufficientFunds',
......@@ -263,6 +263,18 @@ class AccountOwnerType(object):
"""association account"""
class AccountOwnership(object):
Relationship between the credentials owner (PSU) and the account
OWNER = u'owner'
"""The PSU is the account owner"""
CO_OWNER = u'co-owner'
"""The PSU is the account co-owner"""
ATTORNEY = u'attorney'
"""The PSU is the account attorney"""
class Account(BaseAccount):
Bank account.
......@@ -293,6 +305,7 @@ class Account(BaseAccount):
balance = DecimalField('Balance on this bank account')
coming = DecimalField('Sum of coming movements')
iban = StringField('International Bank Account Number', mandatory=False)
ownership = StringField('Relationship between the credentials owner (PSU) and the account') # cf AccountOwnership class
# card attributes
paydate = DateField('For credit cards. When next payment is due.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment