Restructured project

- backend moved to backend directory
- added and initialized frontend with vue
- moved infrastructure files to infra directory
This commit is contained in:
2026-04-01 22:27:26 +03:00
parent 48ef7217eb
commit 9d845c8899
96 changed files with 1591 additions and 118 deletions
+411
View File
@@ -0,0 +1,411 @@
definitions:
domain.CreateFamilyRequest:
properties:
name:
type: string
owner_id:
type: integer
telegram_chat_id:
type: integer
telegram_chat_name:
type: string
type: object
domain.CreateUserRequest:
properties:
first_name:
type: string
language_code:
type: string
last_name:
type: string
telegram_id:
type: integer
username:
type: string
required:
- first_name
- telegram_id
type: object
domain.FamilyResponse:
properties:
created_at:
type: string
id:
type: integer
name:
type: string
owner_id:
type: integer
telegram_chat_id:
type: integer
telegram_chat_name:
type: string
updated_at:
type: string
type: object
domain.UpdateFamilyRequest:
properties:
name:
type: string
telegram_chat_name:
type: string
type: object
domain.UpdateUserRequest:
properties:
first_name:
type: string
language_code:
type: string
last_name:
type: string
username:
type: string
type: object
domain.UserErrorResponse:
properties:
error:
type: string
type: object
domain.UserResponse:
properties:
created_at:
type: string
first_name:
type: string
id:
type: integer
language_code:
type: string
last_name:
type: string
telegram_id:
type: integer
updated_at:
type: string
username:
type: string
type: object
info:
contact: {}
paths:
/families:
post:
consumes:
- application/json
description: Создает новую семью
parameters:
- description: Family info
in: body
name: family
required: true
schema:
$ref: '#/definitions/domain.CreateFamilyRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/domain.FamilyResponse'
"400":
description: invalid body
schema:
additionalProperties:
type: string
type: object
"500":
description: internal server error
schema:
additionalProperties:
type: string
type: object
summary: Создать семью
tags:
- Families
/families/{id}:
delete:
consumes:
- application/json
description: Удаляет семью по ее ID
parameters:
- description: Family ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: no content
schema:
type: string
"400":
description: invalid id
schema:
additionalProperties:
type: string
type: object
"404":
description: family not found
schema:
additionalProperties:
type: string
type: object
"500":
description: internal server error
schema:
additionalProperties:
type: string
type: object
summary: Удалить семью
tags:
- Families
get:
consumes:
- application/json
description: Возвращает семью по ее внутреннему ID
parameters:
- description: Family ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.FamilyResponse'
"400":
description: invalid id
schema:
additionalProperties:
type: string
type: object
"404":
description: family not found
schema:
additionalProperties:
type: string
type: object
"500":
description: internal server error
schema:
additionalProperties:
type: string
type: object
summary: Получить семью по ID
tags:
- Families
patch:
consumes:
- application/json
description: Частично обновляет данные семьи по ID
parameters:
- description: Family ID
in: path
name: id
required: true
type: integer
- description: Данные для обновления
in: body
name: family
required: true
schema:
$ref: '#/definitions/domain.UpdateFamilyRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.FamilyResponse'
"400":
description: name is required
schema:
additionalProperties:
type: string
type: object
"404":
description: family not found
schema:
additionalProperties:
type: string
type: object
"500":
description: internal server error
schema:
additionalProperties:
type: string
type: object
summary: Обновить семью
tags:
- Families
/users:
post:
consumes:
- application/json
parameters:
- description: User info
in: body
name: user
required: true
schema:
$ref: '#/definitions/domain.CreateUserRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/domain.UserResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/domain.UserErrorResponse'
summary: Создать пользователя
tags:
- Users
/users/{id}:
delete:
consumes:
- application/json
description: Удаляет пользователя по его ID
parameters:
- description: User ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: no content
schema:
type: string
"400":
description: invalid id
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"404":
description: user not found
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"500":
description: internal server error
schema:
$ref: '#/definitions/domain.UserErrorResponse'
summary: Удалить пользователя
tags:
- Users
get:
consumes:
- application/json
description: Возвращает пользователя по его внутреннему ID
parameters:
- description: User ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.UserResponse'
"400":
description: invalid id
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"404":
description: user not found
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"500":
description: internal server error
schema:
$ref: '#/definitions/domain.UserErrorResponse'
summary: Получить пользователя по ID
tags:
- Users
patch:
consumes:
- application/json
description: Частично обновляет данные пользователя по ID
parameters:
- description: User ID
in: path
name: id
required: true
type: integer
- description: Данные для обновления
in: body
name: user
required: true
schema:
$ref: '#/definitions/domain.UpdateUserRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.UserResponse'
"400":
description: invalid id or invalid body
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"404":
description: user not found
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"500":
description: internal server error
schema:
$ref: '#/definitions/domain.UserErrorResponse'
summary: Обновить пользователя
tags:
- Users
/users/by-telegram/{telegramId}:
get:
consumes:
- application/json
description: Возвращает пользователя по его Telegram ID
parameters:
- description: Telegram ID
in: path
name: telegramId
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.UserResponse'
"400":
description: invalid telegram id
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"404":
description: user not found
schema:
$ref: '#/definitions/domain.UserErrorResponse'
"500":
description: internal server error
schema:
$ref: '#/definitions/domain.UserErrorResponse'
summary: Получить пользователя по Telegram ID
tags:
- Users
swagger: "2.0"