Remove search engine, add event list api
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-30 11:54:13 +08:00
parent 2aa344a11f
commit 39f555b780
26 changed files with 401 additions and 499 deletions

View File

@@ -809,7 +809,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.InfoResponse"
"$ref": "#/definitions/service_event.EventInfoResponse"
}
}
}
@@ -873,14 +873,14 @@ const docTemplate = `{
}
}
},
"/user/full": {
"/event/list": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetches all user records without pagination. This is typically used for administrative overview or data export.",
"description": "Fetches a list of events with support for pagination via limit and offset. Data is retrieved directly from the database for consistency.",
"consumes": [
"application/json"
],
@@ -888,12 +888,27 @@ const docTemplate = `{
"application/json"
],
"tags": [
"User"
"Event"
],
"summary": "List Events",
"parameters": [
{
"type": "string",
"description": "Maximum number of events to return (default 20)",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Number of events to skip",
"name": "offset",
"in": "query",
"required": true
}
],
"summary": "Get Full User Table",
"responses": {
"200": {
"description": "Successful retrieval of full user table",
"description": "Successful paginated list retrieval",
"schema": {
"allOf": [
{
@@ -903,7 +918,28 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserTableResponse"
"type": "array",
"items": {
"$ref": "#/definitions/data.EventIndexDoc"
}
}
}
}
]
}
},
"400": {
"description": "Invalid Input (Missing offset or malformed parameters)",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
@@ -911,7 +947,7 @@ const docTemplate = `{
}
},
"500": {
"description": "Internal Server Error (Database Error)",
"description": "Internal Server Error (Database query failed)",
"schema": {
"allOf": [
{
@@ -1072,7 +1108,7 @@ const docTemplate = `{
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/data.UserSearchDoc"
"$ref": "#/definitions/data.UserIndexDoc"
}
}
}
@@ -1226,45 +1262,30 @@ const docTemplate = `{
}
},
"definitions": {
"data.User": {
"data.EventIndexDoc": {
"type": "object",
"properties": {
"allow_public": {
"type": "boolean"
},
"avatar": {
"description": {
"type": "string"
},
"bio": {
"end_time": {
"type": "string"
},
"email": {
"event_id": {
"type": "string"
},
"id": {
"type": "integer"
},
"nickname": {
"name": {
"type": "string"
},
"permission_level": {
"type": "integer"
},
"subtitle": {
"start_time": {
"type": "string"
},
"user_id": {
"type": "string"
},
"username": {
"type": "string"
},
"uuid": {
"type": {
"type": "string"
}
}
},
"data.UserSearchDoc": {
"data.UserIndexDoc": {
"type": "object",
"properties": {
"avatar": {
@@ -1394,7 +1415,7 @@ const docTemplate = `{
}
}
},
"service_event.InfoResponse": {
"service_event.EventInfoResponse": {
"type": "object",
"properties": {
"end_time": {
@@ -1440,17 +1461,6 @@ const docTemplate = `{
}
}
},
"service_user.UserTableResponse": {
"type": "object",
"properties": {
"user_table": {
"type": "array",
"items": {
"$ref": "#/definitions/data.User"
}
}
}
},
"utils.RespStatus": {
"type": "object",
"properties": {

View File

@@ -807,7 +807,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.InfoResponse"
"$ref": "#/definitions/service_event.EventInfoResponse"
}
}
}
@@ -871,14 +871,14 @@
}
}
},
"/user/full": {
"/event/list": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetches all user records without pagination. This is typically used for administrative overview or data export.",
"description": "Fetches a list of events with support for pagination via limit and offset. Data is retrieved directly from the database for consistency.",
"consumes": [
"application/json"
],
@@ -886,12 +886,27 @@
"application/json"
],
"tags": [
"User"
"Event"
],
"summary": "List Events",
"parameters": [
{
"type": "string",
"description": "Maximum number of events to return (default 20)",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Number of events to skip",
"name": "offset",
"in": "query",
"required": true
}
],
"summary": "Get Full User Table",
"responses": {
"200": {
"description": "Successful retrieval of full user table",
"description": "Successful paginated list retrieval",
"schema": {
"allOf": [
{
@@ -901,7 +916,28 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserTableResponse"
"type": "array",
"items": {
"$ref": "#/definitions/data.EventIndexDoc"
}
}
}
}
]
}
},
"400": {
"description": "Invalid Input (Missing offset or malformed parameters)",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
@@ -909,7 +945,7 @@
}
},
"500": {
"description": "Internal Server Error (Database Error)",
"description": "Internal Server Error (Database query failed)",
"schema": {
"allOf": [
{
@@ -1070,7 +1106,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/data.UserSearchDoc"
"$ref": "#/definitions/data.UserIndexDoc"
}
}
}
@@ -1224,45 +1260,30 @@
}
},
"definitions": {
"data.User": {
"data.EventIndexDoc": {
"type": "object",
"properties": {
"allow_public": {
"type": "boolean"
},
"avatar": {
"description": {
"type": "string"
},
"bio": {
"end_time": {
"type": "string"
},
"email": {
"event_id": {
"type": "string"
},
"id": {
"type": "integer"
},
"nickname": {
"name": {
"type": "string"
},
"permission_level": {
"type": "integer"
},
"subtitle": {
"start_time": {
"type": "string"
},
"user_id": {
"type": "string"
},
"username": {
"type": "string"
},
"uuid": {
"type": {
"type": "string"
}
}
},
"data.UserSearchDoc": {
"data.UserIndexDoc": {
"type": "object",
"properties": {
"avatar": {
@@ -1392,7 +1413,7 @@
}
}
},
"service_event.InfoResponse": {
"service_event.EventInfoResponse": {
"type": "object",
"properties": {
"end_time": {
@@ -1438,17 +1459,6 @@
}
}
},
"service_user.UserTableResponse": {
"type": "object",
"properties": {
"user_table": {
"type": "array",
"items": {
"$ref": "#/definitions/data.User"
}
}
}
},
"utils.RespStatus": {
"type": "object",
"properties": {

View File

@@ -1,31 +1,21 @@
basePath: /api/v1
definitions:
data.User:
data.EventIndexDoc:
properties:
allow_public:
type: boolean
avatar:
description:
type: string
bio:
end_time:
type: string
email:
event_id:
type: string
id:
type: integer
nickname:
name:
type: string
permission_level:
type: integer
subtitle:
start_time:
type: string
user_id:
type: string
username:
type: string
uuid:
type:
type: string
type: object
data.UserSearchDoc:
data.UserIndexDoc:
properties:
avatar:
type: string
@@ -108,7 +98,7 @@ definitions:
checkin_code:
type: string
type: object
service_event.InfoResponse:
service_event.EventInfoResponse:
properties:
end_time:
type: string
@@ -138,13 +128,6 @@ definitions:
username:
type: string
type: object
service_user.UserTableResponse:
properties:
user_table:
items:
$ref: '#/definitions/data.User'
type: array
type: object
utils.RespStatus:
properties:
code:
@@ -608,7 +591,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_event.InfoResponse'
$ref: '#/definitions/service_event.EventInfoResponse'
type: object
"400":
description: Invalid Input
@@ -642,26 +625,47 @@ paths:
summary: Get Event Information
tags:
- Event
/user/full:
/event/list:
get:
consumes:
- application/json
description: Fetches all user records without pagination. This is typically
used for administrative overview or data export.
description: Fetches a list of events with support for pagination via limit
and offset. Data is retrieved directly from the database for consistency.
parameters:
- description: Maximum number of events to return (default 20)
in: query
name: limit
type: string
- description: Number of events to skip
in: query
name: offset
required: true
type: string
produces:
- application/json
responses:
"200":
description: Successful retrieval of full user table
description: Successful paginated list retrieval
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_user.UserTableResponse'
items:
$ref: '#/definitions/data.EventIndexDoc'
type: array
type: object
"400":
description: Invalid Input (Missing offset or malformed parameters)
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"500":
description: Internal Server Error (Database Error)
description: Internal Server Error (Database query failed)
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
@@ -671,9 +675,9 @@ paths:
type: object
security:
- ApiKeyAuth: []
summary: Get Full User Table
summary: List Events
tags:
- User
- Event
/user/info:
get:
consumes:
@@ -751,7 +755,7 @@ paths:
- properties:
data:
items:
$ref: '#/definitions/data.UserSearchDoc'
$ref: '#/definitions/data.UserIndexDoc'
type: array
type: object
"400":