|
|
|
@ -3,8 +3,22 @@ from werkzeug.security import generate_password_hash |
|
|
|
|
from string import ascii_letters, digits |
|
|
|
|
from random import choices |
|
|
|
|
|
|
|
|
|
from restapi import Methods |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Union(Document): |
|
|
|
|
meta = { |
|
|
|
|
'index_background': True, |
|
|
|
|
'index_cls': False, |
|
|
|
|
'auto_create_index': True, |
|
|
|
|
'can_query': True, |
|
|
|
|
'with_sub_docs': True, |
|
|
|
|
'methods': [Methods.Get, Methods.List, Methods.Create], |
|
|
|
|
"indexes": [ |
|
|
|
|
('name'), |
|
|
|
|
("-name"), |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
name = StringField() |
|
|
|
|
logo = ImageField(thumbnail_size=(120, 120)) |
|
|
|
|
description = StringField() |
|
|
|
|