2019-06-10 21:24:35 +00:00
|
|
|
from jsonmodels import models, fields
|
2020-08-10 05:30:40 +00:00
|
|
|
from jsonmodels.validators import Length
|
2019-06-10 21:24:35 +00:00
|
|
|
|
2021-01-05 16:25:18 +00:00
|
|
|
from apiserver.apimodels import MongoengineFieldsDict, ListField
|
2019-06-10 21:24:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
class UpdateResponse(models.Base):
|
|
|
|
updated = fields.IntField(required=True)
|
|
|
|
fields = MongoengineFieldsDict()
|
|
|
|
|
|
|
|
|
|
|
|
class PagedRequest(models.Base):
|
|
|
|
page = fields.IntField()
|
|
|
|
page_size = fields.IntField()
|
2019-12-29 07:03:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
class IdResponse(models.Base):
|
|
|
|
id = fields.StringField(required=True)
|
2020-08-10 05:30:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MakePublicRequest(models.Base):
|
|
|
|
ids = ListField(items_types=str, validators=[Length(minimum_value=1)])
|
2021-01-05 16:05:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveRequest(models.Base):
|
|
|
|
ids = ListField([str], validators=Length(minimum_value=1))
|
|
|
|
project = fields.StringField()
|
|
|
|
project_name = fields.StringField()
|