mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add aurweb.models.account_type.AccountType
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
4238a9fc68
commit
32f2893095
3 changed files with 48 additions and 0 deletions
0
aurweb/models/__init__.py
Normal file
0
aurweb/models/__init__.py
Normal file
20
aurweb/models/account_type.py
Normal file
20
aurweb/models/account_type.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from sqlalchemy.orm import mapper
|
||||
|
||||
from aurweb.schema import AccountTypes
|
||||
|
||||
|
||||
class AccountType:
|
||||
""" An ORM model of a single AccountTypes record. """
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.AccountType = kwargs.pop("AccountType")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.AccountType)
|
||||
|
||||
def __repr__(self):
|
||||
return "<AccountType(ID='%s', AccountType='%s')>" % (
|
||||
self.ID, str(self))
|
||||
|
||||
|
||||
mapper(AccountType, AccountTypes, confirm_deleted_rows=False)
|
Loading…
Add table
Add a link
Reference in a new issue