-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
177532a
commit 4275e19
Showing
11 changed files
with
152 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
__all__ = ['Account', 'Card', 'Transaction', 'File'] | ||
__all__ = ['Account', 'Biller', 'Card', 'Transaction', 'File', 'User'] | ||
|
||
from .accounts import Account | ||
from .billers import Biller | ||
from .cards import Card | ||
from .files import File | ||
from .transactions import Transaction | ||
from .users import User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import datetime as dt | ||
|
||
from mongoengine import DateTimeField, Document, StringField | ||
|
||
from agave.models import BaseModel | ||
from agave.models.helpers import uuid_field | ||
|
||
|
||
class Biller(BaseModel, Document): | ||
id = StringField(primary_key=True, default=uuid_field('BL')) | ||
created_at = DateTimeField(default=dt.datetime.utcnow) | ||
name = StringField(required=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import datetime as dt | ||
|
||
from mongoengine import DateTimeField, Document, StringField | ||
|
||
from agave.models import BaseModel | ||
from agave.models.helpers import uuid_field | ||
|
||
|
||
class User(BaseModel, Document): | ||
id = StringField(primary_key=True, default=uuid_field('US')) | ||
created_at = DateTimeField(default=dt.datetime.utcnow) | ||
name = StringField(required=True) | ||
platform_id = StringField(required=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
__all__ = ['app', 'Account', 'Card', 'File', 'Transaction'] | ||
__all__ = ['app', 'Account', 'Biller', 'Card', 'File', 'Transaction', 'User'] | ||
|
||
from .accounts import Account | ||
from .base import app | ||
from .billers import Biller | ||
from .cards import Card | ||
from .files import File | ||
from .transactions import Transaction | ||
from .users import User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from agave.filters import generic_query | ||
|
||
from ..models import Biller as BillerModel | ||
from ..validators import BillerQuery | ||
from .base import app | ||
|
||
|
||
@app.resource('/billers') | ||
class Biller: | ||
model = BillerModel | ||
query_validator = BillerQuery | ||
get_query_filter = generic_query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from agave.filters import generic_query | ||
|
||
from ..models import User as UserModel | ||
from ..validators import UserQuery | ||
from .base import app | ||
|
||
|
||
@app.resource('/users') | ||
class User: | ||
model = UserModel | ||
query_validator = UserQuery | ||
get_query_filter = generic_query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters