class UpdateProductForm(BaseUpdateForm): name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) code = fields.String(validate=STRING_LENGTH_VALIDATORS['EX_SHORT']) price = fields.Integer() default_image_id = IdField() status = ProductStatusField() sizes = fields.List(ProductSizeField()) promotion_package_id = IdField(allow_none=True)
class ListProductForm(BaseListForm): search_text = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) categories = fields.List(IdField()) statuses = fields.List(ProductStatusField()) is_sale_off = fields.Boolean()
class CreateOrderForm(BaseForm): product_id = IdField(required=True) quantity = fields.Integer(required=True, validate=lambda value: value > 0) phone = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'], required=True) name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'], required=True) email = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) address = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) product_type = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) description = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'])
class CreateWifiForm(BaseForm): country = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) internet_name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) connection = fields.Integer(required=True) speed_download = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) speed_upload = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) information = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) prepayment = fields.Integer(required=True) price_day = fields.Integer(required=True) image_id = IdField() continent = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'])
class CreateProductForm(BaseCreateForm): name = fields.String(required=True, validate=STRING_LENGTH_VALIDATORS['LONG']) code = fields.String(validate=STRING_LENGTH_VALIDATORS['EX_SHORT']) price = fields.Integer() category_id = CategoryField(required=True) status = ProductStatusField() sizes = fields.List(ProductSizeField()) promotion_package_id = IdField(allow_none=True)
class GetPostForm(BaseForm): id = IdField() slug = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'])
class CreatePostForm(BaseCreateForm): name = fields.String(required=True, validate=STRING_LENGTH_VALIDATORS['LONG']) category_id = PostCategoryField(required=True) banner = IdField()
class UpdateBannerForm(BaseUpdateForm): name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) object_id = IdField() object_type = fields.String(validate=STRING_LENGTH_VALIDATORS['EX_SHORT'])
class BaseCreateProductForm(BaseForm): name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) price = fields.Integer(required=True) category = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) image_id = IdField(required=True) country = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'])
class GetSimDetailForm(BaseForm): slug = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) id = IdField()
class UpdateCategoryForm(BaseUpdateForm): name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) parent_id = IdField()
class GetSimForm(BaseForm): product_id = IdField(required=True)
class CreateSimForm(BaseForm): owned = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) day_used = fields.Integer(required=True) price = fields.Integer(required=True) image_id = IdField() country = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG'])
class DeleteSimForm(BaseForm): id = IdField(required=True)
class ListCategoryForm(BaseListForm): name = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) parent_id = IdField() get_parents = fields.Boolean()