2013-02-08 13:07:27 +01:00
|
|
|
"""
|
|
|
|
This file is part of Accountant.
|
|
|
|
|
|
|
|
Accountant is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Foobar is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
"""
|
2013-12-03 22:22:25 +01:00
|
|
|
from . import db
|
2013-01-24 00:01:42 +01:00
|
|
|
|
|
|
|
class Account(db.Model):
|
|
|
|
id = db.Column(db.Integer, primary_key = True)
|
|
|
|
name = db.Column(db.String(200), nullable = False)
|
2013-01-24 20:44:09 +01:00
|
|
|
authorized_overdraft = db.Column(db.Integer, nullable = True, default = 0)
|
2013-01-24 00:01:42 +01:00
|
|
|
|
2013-01-24 20:44:09 +01:00
|
|
|
def __init__(self, name, authorized_overdraft):
|
2013-01-24 00:01:42 +01:00
|
|
|
self.name = name
|
2013-01-24 20:44:09 +01:00
|
|
|
self.authorized_overdraft = authorized_overdraft
|
2013-01-24 00:01:42 +01:00
|
|
|
|