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 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 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 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 CreatePromotionPackageForm(BaseCreateForm): name = fields.String(required=True, validate=STRING_LENGTH_VALIDATORS['LONG']) sale_off_value = fields.Integer(required=True, validate=lambda value: 0 <= value <= 100)
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 CreateSimForm(BaseCreateProductForm): owned = fields.String(validate=STRING_LENGTH_VALIDATORS['LONG']) day_used = fields.Integer(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'])