{ "swagger": "2.0", "info": { "description": "Swagger Admin Comics API Documentation.", "title": "Admin Comics API Documentation", "contact": {}, "version": "1.0" }, "host": "localhost:8080", "basePath": "/", "paths": { "/api/ads": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get list of advertisements with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Get advertisement list", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Filter by title", "name": "title", "in": "query" }, { "type": "string", "description": "Filter by type (internal/external)", "name": "type", "in": "query" }, { "type": "string", "description": "Filter by status (active/inactive)", "name": "status", "in": "query" }, { "type": "string", "description": "Sort by field (e.g. title, created_at, updated_at)", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order (ASC/DESC)", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "Get advertisement list successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.AdsResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing advertisement", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Update advertisement", "parameters": [ { "description": "Advertisement Update Request", "name": "ad", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AdsUpdateRequest" } }, { "type": "string", "description": "Filter by status (active/inactive)", "name": "status", "in": "query" } ], "responses": { "200": { "description": "Advertisement updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AdsResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new advertisement", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Create a new advertisement", "parameters": [ { "description": "Advertisement Request", "name": "ad", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AdsCreateRequest" } }, { "type": "string", "description": "Filter by status (active/inactive)", "name": "status", "in": "query" } ], "responses": { "200": { "description": "Advertisement created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AdsResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/ads/upload-image": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload an image for advertisement", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Upload advertisement image", "parameters": [ { "type": "file", "description": "Image file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Advertisement image uploaded successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/ads/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get detailed information of an advertisement by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Get advertisement by ID", "parameters": [ { "type": "integer", "description": "Advertisement ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Get advertisement successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AdsResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete an advertisement by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Delete advertisement", "parameters": [ { "type": "integer", "description": "Advertisement ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Advertisement deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/ads/{id}/status": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Update the status of an advertisement to active or inactive", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ads" ], "summary": "Update advertisement status", "parameters": [ { "type": "integer", "description": "Advertisement ID", "name": "id", "in": "path", "required": true }, { "description": "Status Request", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AdsUpdateStatusRequest" } } ], "responses": { "200": { "description": "Advertisement status updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AdsResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/author": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all authors", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authors" ], "summary": "List GetAuthors", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Sort By", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort", "name": "sort", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "List authors", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.AuthorResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing author", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authors" ], "summary": "Update author by Id", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Author Update Request", "name": "author", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AuthorUpdateRequest" } } ], "responses": { "200": { "description": "Author updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AuthorResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new author", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authors" ], "summary": "Create author", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Author Request", "name": "author", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AuthorRequest" } } ], "responses": { "200": { "description": "Author created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AuthorResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/author/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a author by GetAuthorById", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authors" ], "summary": "Get GetAuthorById", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Author ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Author found", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AuthorResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete an existing author", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authors" ], "summary": "Delete author by Id", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Author ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Author deleted successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AuthorResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapter-items": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get list of chapter items with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "List chapter items", "parameters": [ { "type": "integer", "description": "Chapter ID", "name": "chapter_id", "in": "query", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Sort by field (e.g. page, created_at, updated_at)", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order (ASC/DESC)", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List chapter items", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ChapterItemResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing chapter item", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "Update chapter item", "parameters": [ { "description": "Chapter Item Update Request", "name": "item", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ChapterItemUpdateRequest" } } ], "responses": { "200": { "description": "Chapter item updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterItemResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new chapter item (page)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "Create chapter item", "parameters": [ { "description": "Chapter Item Request", "name": "item", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ChapterItemCreateRequest" } } ], "responses": { "200": { "description": "Chapter item created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterItemResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapter-items/upload-image": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload an image for a chapter item", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "Upload chapter image", "parameters": [ { "type": "file", "description": "Image file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Chapter item image uploaded successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapter-items/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a chapter item by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "Get chapter item", "parameters": [ { "type": "integer", "description": "Chapter Item ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Chapter item retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterItemResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a chapter item by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapter-items" ], "summary": "Delete chapter item", "parameters": [ { "type": "integer", "description": "Chapter Item ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Chapter item deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapters": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get chapters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapters" ], "summary": "Get chapters", "parameters": [ { "type": "integer", "description": "Comic ID", "name": "comic_id", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List chapters", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ChapterResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update a chapter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapters" ], "summary": "Update a chapter", "parameters": [ { "description": "Chapter Update Request", "name": "chapter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ChapterUpdateRequest" } } ], "responses": { "200": { "description": "Chapter updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new chapter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapters" ], "summary": "Create a new chapter", "parameters": [ { "description": "Chapter Request", "name": "chapter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ChapterRequest" } } ], "responses": { "200": { "description": "Chapter created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapters/active/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Active a chapter by ID", "consumes": [ "application/json" ], "tags": [ "chapters" ], "summary": "Active a chapter", "parameters": [ { "type": "integer", "description": "Chapter ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Record updated successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/chapters/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a chapter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chapters" ], "summary": "Get a chapter", "parameters": [ { "type": "integer", "description": "Chapter ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Chapter retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ChapterResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a chapter by ID", "consumes": [ "application/json" ], "tags": [ "chapters" ], "summary": "Delete a chapter", "parameters": [ { "type": "integer", "description": "Chapter ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Record deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/comics": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all comics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "List comics", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Search query", "name": "q", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order (asc, desc)", "name": "sort", "in": "query" }, { "type": "boolean", "description": "Active", "name": "active", "in": "query" }, { "type": "string", "description": "Language", "name": "language", "in": "query" }, { "type": "string", "description": "Audience", "name": "audience", "in": "query" }, { "type": "integer", "description": "Author ID", "name": "author", "in": "query" }, { "type": "integer", "description": "Genre ID", "name": "genre", "in": "query" } ], "responses": { "200": { "description": "List comics", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ComicReturn" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing comic", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Update comic", "parameters": [ { "type": "integer", "description": "Comic ID", "name": "id", "in": "formData", "required": true }, { "type": "string", "description": "Comic name", "name": "name", "in": "formData", "required": true }, { "type": "string", "description": "Comic description", "name": "description", "in": "formData" }, { "type": "boolean", "description": "Active", "name": "active", "in": "formData" }, { "type": "string", "description": "Language", "name": "lang", "in": "formData" }, { "type": "string", "description": "Audience", "name": "audience", "in": "formData" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Genre ID", "name": "genres", "in": "formData" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Author ID", "name": "authors", "in": "formData" }, { "type": "file", "description": "Comic cover image", "name": "cover", "in": "formData" } ], "responses": { "200": { "description": "Comic updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ComicResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new comic", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Create comic", "parameters": [ { "type": "string", "description": "Comic name", "name": "name", "in": "formData", "required": true }, { "type": "string", "description": "Comic description", "name": "description", "in": "formData" }, { "type": "string", "description": "Language", "name": "lang", "in": "formData" }, { "type": "string", "description": "Audience", "name": "audience", "in": "formData" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Genre ID", "name": "genres", "in": "formData" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Author ID", "name": "authors", "in": "formData" }, { "type": "file", "description": "Comic cover image", "name": "cover", "in": "formData" } ], "responses": { "200": { "description": "Comic created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ComicResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/comics/upload-cover": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload a comic cover image", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Upload a comic cover", "parameters": [ { "type": "file", "description": "Comic cover image", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Comic cover uploaded successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/comics/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a comic by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Get a comic", "parameters": [ { "type": "integer", "description": "Comic ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Comic retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ComicReturn" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a comic by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Delete a comic", "parameters": [ { "type": "integer", "description": "Comic ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Comic successfully deleted", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/comics/{id}/active": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Activate/Deactivate a comic by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "comics" ], "summary": "Activate/Deactivate a comic", "parameters": [ { "type": "integer", "description": "Comic ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Comic activated/deactivated successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/dramas": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get list of dramas", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dramas" ], "summary": "Get list of dramas", "parameters": [ { "type": "integer", "description": "Page", "name": "page", "in": "query" }, { "type": "integer", "description": "Page Size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List of dramas", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ShortDramaResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update a drama", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dramas" ], "summary": "Update a drama", "parameters": [ { "description": "Drama Update Request", "name": "drama", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateShortDramaRequest" } } ], "responses": { "200": { "description": "Drama updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ShortDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a drama", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dramas" ], "summary": "Create a drama", "parameters": [ { "description": "Drama Request", "name": "drama", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ShortDramaRequest" } } ], "responses": { "200": { "description": "Drama created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ShortDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/dramas/active/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Active a drama by ID", "consumes": [ "application/json" ], "tags": [ "dramas" ], "summary": "Active a drama", "parameters": [ { "type": "integer", "description": "Drama ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Drama activated/deactivated successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/dramas/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a drama", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dramas" ], "summary": "Get a drama", "parameters": [ { "type": "integer", "description": "Drama ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Drama retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ShortDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a drama by ID", "consumes": [ "application/json" ], "tags": [ "dramas" ], "summary": "Delete a drama", "parameters": [ { "type": "integer", "description": "Drama ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Drama deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/episodes": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get list of episodes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "episodes" ], "summary": "Get list of episodes", "parameters": [ { "type": "integer", "description": "Drama ID", "name": "drama_id", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "maximum": 50, "minimum": 10, "type": "integer", "description": "Page size (must be between 10 and 50)", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List episodes", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.EpisodeResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an updateEpisode", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "episodes" ], "summary": "Update an updateEpisode", "parameters": [ { "description": "Episode Request", "name": "episode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.EpisodeUpdateRequest" } } ], "responses": { "200": { "description": "Episode updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.EpisodeResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create an createEpisode", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "episodes" ], "summary": "Create an createEpisode", "parameters": [ { "description": "Episode Request", "name": "episode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.EpisodeCreateRequest" } } ], "responses": { "200": { "description": "Episode created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.EpisodeResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/episodes/{id}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete an episode by Id", "consumes": [ "application/json" ], "tags": [ "episodes" ], "summary": "Delete an episode by Id", "parameters": [ { "type": "integer", "description": "Episode ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Episode deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/general/authors": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get general authors", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "general" ], "summary": "Get general authors", "parameters": [ { "type": "string", "description": "Name", "name": "name", "in": "query" } ], "responses": { "200": { "description": "Authors", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GeneralAuthorResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/general/comics": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get general comics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "general" ], "summary": "Get general comics", "parameters": [ { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "integer", "description": "Author ID", "name": "author_id", "in": "query" }, { "type": "integer", "description": "Genre ID", "name": "genre_id", "in": "query" }, { "type": "string", "description": "Language", "name": "lang", "in": "query" }, { "type": "string", "description": "Original language", "name": "original_language", "in": "query" } ], "responses": { "200": { "description": "Comics", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GeneralComicResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/general/drama-genres": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get general drama genres", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "general" ], "summary": "Get general drama genres", "parameters": [ { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Language", "name": "language", "in": "query" } ], "responses": { "200": { "description": "Comics", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GeneralDramaGenreResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/general/genres": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get general genres", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "general" ], "summary": "Get general genres", "parameters": [ { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Language", "name": "language", "in": "query" } ], "responses": { "200": { "description": "Genres", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GeneralGenreResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/general/tiers": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get tiers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "general" ], "summary": "Get tiers", "responses": { "200": { "description": "Tiers", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TierModel" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/genre": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all genre", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres" ], "summary": "List genres", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "Page size (must be between 10 and 50)", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Language", "name": "language", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order (asc, desc)", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List genres", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GenreResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update a new genre", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres" ], "summary": "Update a new genre", "parameters": [ { "description": "Genre Request", "name": "genre", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GenreUpdateRequest" } } ], "responses": { "200": { "description": "Genre updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new genre", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres" ], "summary": "Create a new genre", "parameters": [ { "description": "Genre Request", "name": "genre", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GenreCreateRequest" } } ], "responses": { "200": { "description": "Genre created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/genre/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a genre by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres" ], "summary": "Get a genre", "parameters": [ { "type": "integer", "description": "Genre ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Genre retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a genre by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres" ], "summary": "Delete a genre", "parameters": [ { "type": "integer", "description": "Genre ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Genre successfully deleted", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/genres-drama": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all genres with pagination and filtering", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres-drama" ], "summary": "List genres", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "maximum": 50, "minimum": 10, "type": "integer", "description": "Page size (must be between 10 and 50)", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Filter by name", "name": "name", "in": "query" }, { "type": "string", "description": "Filter by language", "name": "language", "in": "query" }, { "type": "string", "description": "Sort by field", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort direction (asc/desc)", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List of genres", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.GenreDramaResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update a genre for drama with translations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres-drama" ], "summary": "Update a genre for drama", "parameters": [ { "description": "Genre Drama Update Request", "name": "genre", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GenreDramaUpdateRequest" } } ], "responses": { "200": { "description": "Genre updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new genre for drama with translations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres-drama" ], "summary": "Create a new genre for drama", "parameters": [ { "description": "Genre Drama Request", "name": "genre", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GenreDramaCreateRequest" } } ], "responses": { "200": { "description": "Genre created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/genres-drama/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get genre details by ID with translations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres-drama" ], "summary": "Get genre details", "parameters": [ { "type": "integer", "description": "Genre ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Genre details retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GenreDramaResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "404": { "description": "Genre not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a genre and its translations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "genres-drama" ], "summary": "Delete a genre", "parameters": [ { "type": "integer", "description": "Genre ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Genre deleted successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/recommend": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all recommends", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "List recommends", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Sort By", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort", "name": "sort", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Title", "name": "title", "in": "query" } ], "responses": { "200": { "description": "List recommends", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.RecommendResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing recommend", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Update recommend by Id", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Title", "name": "title", "in": "formData", "required": true }, { "type": "integer", "description": "Position", "name": "position", "in": "formData" }, { "type": "integer", "description": "Active From", "name": "active_from", "in": "formData" }, { "type": "integer", "description": "Active To", "name": "active_to", "in": "formData" }, { "type": "file", "description": "Cover ", "name": "cover", "in": "formData" } ], "responses": { "200": { "description": "Recommend updated successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RecommendResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new recommend", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Create recommend", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Title", "name": "title", "in": "formData", "required": true }, { "type": "integer", "description": "Position", "name": "position", "in": "formData" }, { "type": "integer", "description": "Active From", "name": "active_from", "in": "formData" }, { "type": "integer", "description": "Active To", "name": "active_to", "in": "formData" }, { "type": "file", "description": "Cover ", "name": "cover", "in": "formData" } ], "responses": { "200": { "description": "Recommend created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RecommendResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/recommend/comic": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new recommend comic", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Create recommend comic", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Recommend comic create Request", "name": "recommend", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.RecommendComicRequest" } } ], "responses": { "200": { "description": "Recommend comic created successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RecommendComicResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a recommend comic", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Delete recommend comic", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Recommend comic create Request", "name": "recommend", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.RecommendComicRequest" } } ], "responses": { "200": { "description": "Recommend comic deleted successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RecommendComicResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/recommend/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a recommend by Id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Get recommend by Id", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Recommend ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Recommend found", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RecommendResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a recommend by Id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recommends" ], "summary": "Delete recommend by Id", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Recommend ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Recommend successfully deleted", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/uploads/drama-thumb": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload a thumbnail image for a drama", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "uploads" ], "summary": "Upload thumbnail for drama", "parameters": [ { "type": "file", "description": "Thumbnail image file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Thumbnail uploaded successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/uploads/episode-sub": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload a subtitle file for a drama", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "uploads" ], "summary": "Upload subtitle for drama", "parameters": [ { "type": "file", "description": "Subtitle file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Subtitle uploaded successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/uploads/episode-video": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Upload a video file for a drama", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "uploads" ], "summary": "Upload video for drama", "parameters": [ { "type": "integer", "description": "Drama ID", "name": "id", "in": "formData", "required": true }, { "type": "file", "description": "Video file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Video uploaded successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user": { "get": { "security": [ { "BearerAuth": [] } ], "description": "List all user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "List users", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "Page size (must be between 10 and 50)", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "Username", "name": "username", "in": "query" }, { "type": "string", "description": "Phone", "name": "phone", "in": "query" }, { "type": "string", "description": "Email", "name": "email", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Display name", "name": "display_name", "in": "query" }, { "type": "integer", "description": "Tier ID", "name": "tier_id", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order (asc, desc)", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "List users", "schema": { "allOf": [ { "$ref": "#/definitions/dto.ListSuccessResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.UserResponse" } } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update a new user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update a new user", "parameters": [ { "type": "integer", "description": "ID", "name": "id", "in": "formData", "required": true }, { "type": "string", "description": "Username (Alphanumeric)", "name": "username", "in": "formData", "required": true }, { "type": "string", "description": "Phone Number", "name": "phone", "in": "formData" }, { "type": "string", "description": "Email Address", "name": "email", "in": "formData" }, { "type": "string", "description": "Birthday (YYYY-MM-DD)", "name": "birthday", "in": "formData" }, { "type": "string", "description": "First Name", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Last Name", "name": "last_name", "in": "formData" }, { "type": "string", "description": "Display Name", "name": "display_name", "in": "formData", "required": true }, { "type": "string", "description": "Description", "name": "description", "in": "formData" }, { "type": "file", "description": "Avatar File", "name": "avatar", "in": "formData" }, { "type": "integer", "description": "Tier ID", "name": "tier_id", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Create a new user", "parameters": [ { "type": "string", "description": "Bearer authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Username (Alphanumeric)", "name": "username", "in": "formData", "required": true }, { "type": "string", "description": "Phone Number", "name": "phone", "in": "formData" }, { "type": "string", "description": "Email Address", "name": "email", "in": "formData" }, { "type": "string", "description": "Birthday (YYYY-MM-DD)", "name": "birthday", "in": "formData" }, { "type": "string", "description": "Password (Min: 7 chars)", "name": "password", "in": "formData", "required": true }, { "type": "string", "description": "First Name", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Last Name", "name": "last_name", "in": "formData" }, { "type": "string", "description": "Display Name", "name": "display_name", "in": "formData", "required": true }, { "type": "string", "description": "Description", "name": "description", "in": "formData" }, { "type": "file", "description": "Avatar File", "name": "avatar", "in": "formData" }, { "type": "integer", "description": "Tier ID", "name": "tier_id", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserDetailDto" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user/change-password": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Change password", "consumes": [ "application/json" ], "tags": [ "users" ], "summary": "Change password", "parameters": [ { "description": "Change Password Request", "name": "ChangePassword", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UserChangePasswordRequest" } } ], "responses": { "200": { "description": "Password changed successfully", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user/login": { "post": { "description": "Authenticates the user and returns a JWT token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Login", "parameters": [ { "description": "User Login Data", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.LoginResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user/profile": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get profile", "responses": { "200": { "description": "Profile retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update profile", "parameters": [ { "type": "string", "description": "Username (Alphanumeric)", "name": "username", "in": "formData", "required": true }, { "type": "string", "description": "Phone Number", "name": "phone", "in": "formData" }, { "type": "string", "description": "Email Address", "name": "email", "in": "formData" }, { "type": "string", "description": "Birthday (YYYY-MM-DD)", "name": "birthday", "in": "formData" }, { "type": "string", "description": "First Name", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Last Name", "name": "last_name", "in": "formData" }, { "type": "string", "description": "Display Name", "name": "display_name", "in": "formData", "required": true }, { "type": "string", "description": "Description", "name": "description", "in": "formData" }, { "type": "file", "description": "Avatar File", "name": "avatar", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a user by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get a user", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "User retrieved successfully", "schema": { "allOf": [ { "$ref": "#/definitions/dto.SuccessResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserResponse" } } } ] } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a user by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Delete a user", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "User successfully deleted", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } }, "/api/user/{id}/active": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Activate/Deactivate a user by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Activate/Deactivate a user", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "User successfully activated/deactivated", "schema": { "$ref": "#/definitions/dto.SuccessResponse" } }, "400": { "description": "Invalid request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } } } } }, "definitions": { "dto.AdsCreateRequest": { "type": "object", "required": [ "status", "title", "type" ], "properties": { "active_from": { "type": "string" }, "active_to": { "type": "string" }, "comic_id": { "type": "integer" }, "direct_url": { "type": "string" }, "image": { "type": "string" }, "status": { "type": "string", "enum": [ "active", "inactive" ] }, "title": { "type": "string" }, "type": { "type": "string", "enum": [ "internal", "external" ] } } }, "dto.AdsResponse": { "type": "object", "properties": { "active_from": { "type": "string" }, "active_to": { "type": "string" }, "comic_id": { "type": "integer" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "direct_url": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.AdsUpdateRequest": { "type": "object", "required": [ "id" ], "properties": { "active_from": { "type": "string" }, "active_to": { "type": "string" }, "comic_id": { "type": "integer" }, "direct_url": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "status": { "type": "string", "enum": [ "active", "inactive" ] }, "title": { "type": "string" }, "type": { "type": "string", "enum": [ "internal", "external" ] } } }, "dto.AdsUpdateStatusRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "active", "inactive" ] } } }, "dto.AuthorRequest": { "type": "object", "required": [ "name" ], "properties": { "biography": { "type": "string" }, "birth_day": { "type": "string" }, "name": { "type": "string" } } }, "dto.AuthorResponse": { "type": "object", "properties": { "biography": { "type": "string" }, "birth_day": { "type": "string" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.AuthorUpdateRequest": { "type": "object", "required": [ "id" ], "properties": { "biography": { "type": "string" }, "birth_day": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.ChapterItemCreateRequest": { "type": "object", "required": [ "chapter_id", "image", "page" ], "properties": { "active": { "type": "boolean" }, "active_from": { "type": "string" }, "chapter_id": { "type": "integer" }, "image": { "type": "string" }, "page": { "type": "integer" } } }, "dto.ChapterItemResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "active_from": { "type": "string" }, "chapter_id": { "type": "integer" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "page": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.ChapterItemUpdateRequest": { "type": "object", "required": [ "id" ], "properties": { "active": { "type": "boolean" }, "active_from": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "page": { "type": "integer" } } }, "dto.ChapterRequest": { "type": "object", "required": [ "comic_id" ], "properties": { "active_from": { "type": "string" }, "comic_id": { "type": "integer" }, "cover": { "type": "boolean" }, "name": { "type": "string" }, "number": { "type": "integer" } } }, "dto.ChapterResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "active_from": { "type": "string" }, "comic_id": { "type": "integer" }, "cover": { "type": "boolean" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "number": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.ChapterUpdateRequest": { "type": "object", "required": [ "comic_id", "id" ], "properties": { "active_from": { "type": "string" }, "comic_id": { "type": "integer" }, "cover": { "type": "boolean" }, "id": { "type": "integer" }, "name": { "type": "string" }, "number": { "type": "integer" } } }, "dto.ComicRecommendResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.ComicResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "audience": { "type": "string" }, "code": { "type": "string" }, "cover": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "id": { "type": "integer" }, "lang": { "type": "string" }, "name": { "type": "string" }, "original_language": { "type": "string" }, "status": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "dto.ComicReturn": { "type": "object", "properties": { "active": { "type": "boolean" }, "audience": { "type": "string" }, "authors": { "type": "array", "items": { "$ref": "#/definitions/dto.AuthorResponse" } }, "code": { "type": "string" }, "cover": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "created_by_user": { "$ref": "#/definitions/dto.UserDetailDto" }, "description": { "type": "string" }, "genres": { "type": "array", "items": { "$ref": "#/definitions/dto.GenreResponse" } }, "id": { "type": "integer" }, "lang": { "type": "string" }, "name": { "type": "string" }, "original_language": { "type": "string" }, "status": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "updated_by_user": { "$ref": "#/definitions/dto.UserDetailDto" } } }, "dto.DramaTranslation": { "type": "object", "properties": { "description": { "type": "string" }, "language": { "type": "string" }, "title": { "type": "string" } } }, "dto.EpisodeCreateRequest": { "type": "object", "properties": { "active": { "type": "boolean" }, "drama_id": { "type": "integer" }, "number": { "type": "integer" }, "subtitles": { "type": "array", "items": { "$ref": "#/definitions/dto.Subtitle" } }, "video": { "type": "string" } } }, "dto.EpisodeResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "drama_id": { "type": "integer" }, "id": { "type": "integer" }, "number": { "type": "integer" }, "subtitles": { "type": "array", "items": { "$ref": "#/definitions/dto.Subtitle" } }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" }, "video": { "type": "string" } } }, "dto.EpisodeUpdateRequest": { "type": "object", "required": [ "id" ], "properties": { "active": { "type": "boolean" }, "drama_id": { "type": "integer" }, "id": { "type": "integer" }, "number": { "type": "integer" }, "subtitles": { "type": "array", "items": { "$ref": "#/definitions/dto.Subtitle" } }, "video": { "type": "string" } } }, "dto.ErrorResponse": { "type": "object", "properties": { "code": { "type": "string", "example": "ERROR" }, "msg": { "type": "string" } } }, "dto.GeneralAuthorResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.GeneralComicResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.GeneralDramaGenreResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.GeneralGenreResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "dto.GenreCreateRequest": { "type": "object", "required": [ "language", "name", "position" ], "properties": { "language": { "type": "string" }, "name": { "type": "string" }, "position": { "type": "integer" } } }, "dto.GenreDramaCreateRequest": { "type": "object", "required": [ "name", "position", "translations" ], "properties": { "name": { "type": "string" }, "position": { "type": "integer" }, "translations": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/dto.GenreTranslationRequest" } } } }, "dto.GenreDramaResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "integer" }, "translations": { "type": "array", "items": { "$ref": "#/definitions/dto.GenreTranslationResponse" } }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "dto.GenreDramaUpdateRequest": { "type": "object", "required": [ "id", "name", "position", "translations" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "integer" }, "translations": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/dto.GenreTranslationRequest" } } } }, "dto.GenreForShortDramaResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "integer" } } }, "dto.GenreResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "id": { "type": "integer" }, "lang": { "type": "string" }, "name": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.GenreTranslationRequest": { "type": "object", "required": [ "language", "translated_name" ], "properties": { "language": { "type": "string" }, "translated_name": { "type": "string" } } }, "dto.GenreTranslationResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "genre_id": { "type": "integer" }, "id": { "type": "integer" }, "language": { "type": "string" }, "translated_name": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "dto.GenreUpdateRequest": { "type": "object", "required": [ "id", "language", "name", "position" ], "properties": { "id": { "type": "integer" }, "language": { "type": "string" }, "name": { "type": "string" }, "position": { "type": "integer" } } }, "dto.ListSuccessResponse": { "type": "object", "properties": { "code": { "type": "string", "example": "SUCCESS" }, "data": {}, "msg": { "type": "string", "example": "success" }, "pagination": { "$ref": "#/definitions/dto.Pagination" } } }, "dto.LoginRequest": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "type": "string", "minLength": 7 }, "username": { "type": "string" } } }, "dto.LoginResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "access_token_expires_at": { "type": "string" }, "user": { "$ref": "#/definitions/dto.UserDetailDto" } } }, "dto.Pagination": { "type": "object", "properties": { "page": { "type": "integer", "example": 1 }, "page_size": { "type": "integer", "example": 10 }, "total": { "type": "integer", "example": 100 } } }, "dto.RecommendComicRequest": { "type": "object", "properties": { "comic_id": { "type": "integer" }, "recommend_id": { "type": "integer" } } }, "dto.RecommendComicResponse": { "type": "object", "properties": { "comic_id": { "type": "integer" }, "id": { "type": "integer" }, "recommend_id": { "type": "integer" } } }, "dto.RecommendResponse": { "type": "object", "properties": { "active_from": { "type": "string" }, "active_to": { "type": "string" }, "comics": { "type": "array", "items": { "$ref": "#/definitions/dto.ComicRecommendResponse" } }, "cover": { "type": "string" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "id": { "type": "integer" }, "position": { "type": "integer" }, "title": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.ShortDramaRequest": { "type": "object", "properties": { "genres": { "type": "array", "items": { "type": "integer" } }, "release_date": { "type": "string" }, "thumb": { "type": "string" }, "translations": { "type": "array", "items": { "$ref": "#/definitions/dto.DramaTranslation" } } } }, "dto.ShortDramaResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "genres": { "type": "array", "items": { "$ref": "#/definitions/dto.GenreForShortDramaResponse" } }, "id": { "type": "integer" }, "release_date": { "type": "string" }, "thumb": { "type": "string" }, "translations": { "type": "array", "items": { "$ref": "#/definitions/dto.DramaTranslation" } }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" } } }, "dto.Subtitle": { "type": "object", "properties": { "language": { "type": "string" }, "url": { "type": "string" } } }, "dto.SuccessResponse": { "type": "object", "properties": { "code": { "type": "string", "example": "SUCCESS" }, "data": {}, "msg": { "type": "string", "example": "success" } } }, "dto.TierModel": { "type": "object", "properties": { "code": { "type": "string" }, "id": { "type": "integer" } } }, "dto.UpdateShortDramaRequest": { "type": "object", "required": [ "id" ], "properties": { "genres": { "type": "array", "items": { "type": "integer" } }, "id": { "type": "integer" }, "release_date": { "type": "string" }, "thumb": { "type": "string" }, "translations": { "type": "array", "items": { "$ref": "#/definitions/dto.DramaTranslation" } } } }, "dto.UserChangePasswordRequest": { "type": "object", "required": [ "current_password", "new_password" ], "properties": { "current_password": { "type": "string", "minLength": 7 }, "new_password": { "type": "string", "minLength": 7 } } }, "dto.UserDetailDto": { "type": "object", "properties": { "active": { "type": "boolean" }, "avatar": { "type": "string" }, "birthday": { "type": "string" }, "description": { "type": "string" }, "display_name": { "type": "string" }, "email": { "type": "string" }, "first_name": { "type": "string" }, "full_name": { "type": "string" }, "id": { "type": "integer" }, "last_name": { "type": "string" }, "phone": { "type": "string" }, "role_name": { "type": "string" }, "tier_code": { "type": "string" }, "tier_id": { "type": "integer" }, "username": { "type": "string" } } }, "dto.UserResponse": { "type": "object", "properties": { "active": { "type": "boolean" }, "avatar": { "type": "string" }, "birthday": { "type": "string" }, "created_at": { "type": "string" }, "created_by_name": { "type": "string" }, "description": { "type": "string" }, "display_name": { "type": "string" }, "email": { "type": "string" }, "first_name": { "type": "string" }, "full_name": { "type": "string" }, "id": { "type": "integer" }, "last_name": { "type": "string" }, "phone": { "type": "string" }, "role_name": { "type": "string" }, "tier_code": { "type": "string" }, "tier_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by_name": { "type": "string" }, "username": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }