| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- import pydantic
- class user_login_request(pydantic.BaseModel):
- nick: str
- password: str
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "nick": "test",
- "password": "QWERTYZ"
- }
- ]
- }
- }
- class user_get_request(pydantic.BaseModel):
- apikey: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...699",
- }
- ]
- }
- }
- class product_update_request(pydantic.BaseModel):
- apikey: str
- name: str
- description: str
- author: str
- stock_count: int
- barcode: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...69",
- "name": "Product Name",
- "description": "Product description.",
- "author": "Product author.",
- "stocik_count": 10,
- "barcode": "509282819938"
- }
- ]
- }
- }
- class product_create_request(pydantic.BaseModel):
- apikey: str
- name: str
- description: str
- author: str
- image: str
- stock_count: str
- barcode: str
- model_config = {
- "json_schema_extra": {
- "examples": [
- {
- "apikey": "af...69",
- "name": "Product Name",
- "description": "Product description.",
- "author": "Product author.",
- "image": "ddshfgiuhiugde... base64 encoded image",
- "stocik_count": 10,
- "barcode": "509282819938"
- }
- ]
- }
- }
- class product_update_image_request(pydantic.BaseModel):
- apikey: str
- image: str
- model_config = {
- "json_schema_extra": {
- "examples": [
- {
- "apikey": "af...69",
- "image": "lfjskhgshgkfj base64 encoded image"
- }
- ]
- }
- }
- class apikey_request(pydantic.BaseModel):
- apikey: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...699",
- }
- ]
- }
- }
|