azoyan / letsrock-backend Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Юридическая информация об организации, должна быть в соответствии с местным законодательством.
Поля запроса для каждой страны / штата будут отличаться.
Для каждой страны должен быть создана таблица, поля которой представляют юридически значимую информацию. Применяется наследование таблиц от базовой Country.
Алгоритм:
"country"
в запросе;"owner"
для страны (из словаря (если есть))Ниже приведён запрос для России:
{
"uuid":11235,
"name": "Old Age",
"building":
{
"address":
{
"country": "Russia",
"region": "Moscow",
"city": "Moscow",
"street": "Kransoproletarskaya",
"building": 5
},
"rooms_count": 4,
"services": [1, 10, 5]
},
"owner":
{
"taxpayer_identification_number": 771717,
"organizational_legal_form": "Limited Liability Company (LLC)",
"name": "Centralniy Zhil-Stroy",
"person":
[
{
"name": "Mikhail",
"lastname": "Suvorov",
"passport_id": 4808654277
}
]
}
}
Запрашиваются реп. базы в городе пользователя.
Ранжирование происходит в следующем порядке:
Сначала показываются репбазы с рейтингом 5, и они уже ранижруются по расстоянию от пользователя (сначала наиболее близкие к пользователю).
Аналогично отображаются репбазы с рейтингом 4.
Если у репбазы рейтинг меньше 4 или отсутствует, то рейтинг не учитывается, и отображаются по расстоянию от пользователя.
Запрос:
{
"uuid": 1011299,
"repetition_base": true,
"drum_room": false,
"studio": false,
"position": {
"latitude": 55.751244,
"longitude": 37.618423
}
}
Ответ:
{
"organizations": [
{
"uuid": 1356,
"name": "Old Age",
"rate": 5,
"distance": 14.7,
"images": [
"binary",
"binary",
"binary",
"binary"
],
"position": {
"latitude": 55.124,
"longitude": 37.124124
}
},
{
"uuid": 1357,
"name": "Hendrix Studio",
"rate": 5,
"distance": 17.2,
"images": [
[
"binary",
"binary",
"binary",
"binary"
]
],
"position": {
"latitude": 55.14,
"longitude": 37.4
}
},
{
"uuid": 1358,
"name": "Rock Base",
"rate": 4,
"distance": 13.1,
"images": [
[
"binary",
"binary",
"binary",
"binary"
]
],
"position": {
"latitude": 55.214,
"longitude": 37.014
}
},
{
}
]
}
Если на сервере есть информация о том, что пользователь уже репетировал, то в вершине списка будет последняя репетиционная база в которой пользователь был:
{
"organizations": [
{
"uuid": 2416,
"name": "Orange Station",
"rate": 5,
"distance": 17.7,
"images": [
"binary",
"binary",
"binary",
"binary"
],
"position": {
"latitude": 55.11224,
"longitude": 37.4124
}
},
{
"uuid": 1356,
"name": "Old Age",
"rate": 5,
"distance": 14.7,
"images": [
"binary",
"binary",
"binary",
"binary"
],
"position": {
"latitude": 55.124,
"longitude": 37.124124
}
},
{
"uuid": 1357,
"name": "Hendrix Studio",
"rate": 5,
"distance": 17.2,
"images": [
"binary",
"binary",
"binary",
"binary"
],
"position": {
"latitude": 55.14,
"longitude": 37.4
}
},
{
"uuid": 1358,
"name": "Rock Base",
"rate": 4,
"distance": 13.1,
"images": [
"binary",
"binary",
"binary",
"binary"
],
"position": {
"latitude": 55.214,
"longitude": 37.014
}
},
{
}
]
}
Запрос:
{
"name": "Old Age",
"rooms":
[
{
"name": "Маленькая 1",
"services": [1],
"square": 12,
"photos":
[
"binary", "binary", "binary"
],
"equipment":
[
]
},
{
"name": "Маленькая 2",
"services": [1],
"square": 13,
"photos":
[
"binary", "binary", "binary", "binary"
],
"equipment":
[
]
},
{
"name": "Большая 1",
"services": [1, 10],
"square": 18,
"photos":
[
"binary", "binary", "binary", "binary"
],
"equipment":
[
]
},
{
"name": "Большая 2",
"services": [1, 10, 5],
"square": 20,
"photos":
[
"binary", "binary", "binary", "binary", "binary"
],
"equipment":
[
]
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.