Added activities module

This commit is contained in:
2026-04-11 11:51:18 +03:00
parent 8e074db55f
commit 2dc8ff01b7
13 changed files with 694 additions and 4 deletions
+107
View File
@@ -4,6 +4,67 @@
"contact": {}
},
"paths": {
"/activities": {
"get": {
"description": "Возвращает список действий пользователей с пагинацией",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Activities"
],
"summary": "Получить активность пользователей",
"parameters": [
{
"type": "integer",
"description": "Family ID",
"name": "family_id",
"in": "query"
},
{
"type": "integer",
"description": "User ID",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "Limit, default 10",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.ActivityListResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/dto.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/dto.ErrorResponse"
}
}
}
}
},
"/families": {
"post": {
"description": "Создает новую семью",
@@ -1147,6 +1208,52 @@
}
}
},
"dto.ActivityListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.ActivityResponse"
}
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"dto.ActivityResponse": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"entity_id": {
"type": "integer"
},
"entity_type": {
"type": "string"
},
"family_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"user_id": {
"type": "integer"
}
}
},
"dto.CreateTransactionRequest": {
"type": "object",
"required": [