Курсовая кароче по базам данных юзаю виртуальные потоки, так что без корутин, да и в принцепе вроде пока не нужны
- username: (id) String
- firstname: String
- lastname: String
- role: String (only ADMIN or CUSTOMER)
- username: (id) String
- firstname: String
- lastname: String
- email: String
- role: String (only ADMIN or CUSTOMER)
- shippingAddresses: List of String
- username: String
- firstname: String
- lastname: String
- password: String
- role: String
- mailCode: String
- adminSecret: String (can be null) when you want to register as admin
- name: (id) String
- parentCategory: String (category id)
- subcategories: List of Categories ids
- requiredProps: List of string
- name: String
- requiredProps: List of string
- subcategories: List of categories ids (can be null)
- parentCategory: category id (can be null)
- id: (id) String
- caption: String
- categories: List of categories ids
- characteristics: Map String to String (prop to value)
- description: String
- price: Double
- actualPrice: Double // price with discounts
- rate: Double
- ordersCount: Long
- images: List of strings
- caption: String
- categories: List of categories ids
- characteristics: Map String to String (prop to value)
- description: String
- price: Double
- images: List of strings
- id: (id) String
- products: List of Realized Products
- ownerId: Account`s id
- status: String (one of UNPAID,PROCESSING,SHIPPING,COMPLETED,CANCELED)
- shippingAddress: String
- timestamp: Date
- products: List of products ids
- shippingAddress: String
- promoCode: String (can be null)
- caption: String
- description: String
- productId: String
- price: Double
- id: (id) String
- ownerId: Account`s id
- product: Product
- content: String
- rate: Double
- timestamp: Date
- productId: String
- content: String
- rate: Double (0-5)
- id: (id) String
- name: String
- ownerId: Account`s id
- products: List of product
- isPublic: Boolean
- name: String
- isPublic: Boolean
- productsIds: List of products ids (can be null)
- id: (id) String
- description: String
- discount: Double (in %)
- targetCategories: List of categories ids
- description: String
- discount: Double
- targetCategoriesIds: List of categories ids
- id: (id) String
- description: String
- discount: Double (in %)
- targetProducts: List of products
- description: String
- discount: Double
- targetProductsIds List of products ids
- id: (id) String
- description: String
- discount: Double (in %)
- code: String
- description: String
- discount: Double
- code: String
Url | Method | Accepts | Returns | Comment |
---|---|---|---|---|
/register | post | Account.RegisterRequest | Account | |
/add_shipping_address | post | shippingAddress: String | Account | |
/remove_shipping_address | post | shippingAddress: String | Account | |
/get_me | get | Account | ||
/find_users | get | query:String, page:Int, pageSize:Int | Account | |
/send_email_code | post | email:String | send email with code to user`s email to pass it with register request | |
/category/register | post | Category.RegisterRequest | Category | |
/category/find | get | query:String, page:Int, pageSize:Int | Page of Categories | |
/category/list | get | page:Int, pageSize: Int | Page of categories | |
/ category/count | get | Int | ||
/product/register | post | Product.RegisterRequest | Product | |
/product/delete | post | productId: String | ||
/product/find | get | query:String, page:Int, pageSize:Int | Page of products | |
/product/count | get | Int | ||
/product/findV2 | get | query: QueryConstructor, sort: SortConstructor, page:Int, pageSize:Int | Page of products | |
/product/findV3 | get | query: QueryConstructor, sort: String, page:Int, pageSize:Int | Page of products | Sort must be one of PRICE_DESCENDING, PRICE_ASCENDING, ORDER_COUNT_DESCENDING |
/product/edit | post | Product | Product | |
/discount/register | post | Discount.RegisterRequest | Discount | |
/discount/delete | post | discountId:String | ||
/discount/list | get | page:Int, pageSize:Int | Page of discounts | |
/order/register | post | Order.RegisterRequest | Order | |
/order/cancel | post | orderId:String | Order | |
/order/change_status | post | orderId:String, newStatus: Status | Order | |
/order/list_my | get | page:Int, pageSize:Int | Page of orders | |
/order/count_my | get | Int | ||
/order/calculate | get | Order.RegisterRequest | List of RealizedProduct | calculates order with all discounts |
/comments/register | post | Comment.RegisterRequest | Comment | |
/comments/delete | post | commentId: String | ||
/comments/list | get | productId:String, page:Int, pageSize: Int | Page of comments | |
/favlist/create | post | FavouriteList.RegisterRequest | FavouriteList | |
/favlist/delete | post | listId:String | ||
/favlist/change_visibility | post | listId:String, isPublic:String | FavouriteList | |
/favlist/add_product | post | listId:String, productId:String | FavouriteList | |
/favlist/remove_product | post | listId:String, productId:String | FavouriteList | |
/favlist/get_my | get | List of FavouteLists | ||
/favlist/get_public | get | listId:String | FavouriteList | get favourite list by id if it is public |
/favlist/find_account_public_lists | get | accountId:String | List of favourite lists | get user`s favourite lists |