diff --git a/docs/docs.go b/docs/docs.go index f4ce0c9e..72604af5 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3469,13 +3469,6 @@ const docTemplate = `{ "Invitee": { "type": "integer" }, - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - }, "Role": { "$ref": "#/definitions/accountModel.UserRole" } @@ -3501,8 +3494,20 @@ const docTemplate = `{ "AccountMapping": { "type": "object", "properties": { - "AccountId": { + "CreateTime": { + "type": "string" + }, + "Id": { "type": "integer" + }, + "MainAccount": { + "$ref": "#/definitions/AccountOne" + }, + "RelatedAccount": { + "$ref": "#/definitions/AccountDetail" + }, + "UpdateTime": { + "type": "string" } } }, @@ -3834,7 +3839,7 @@ const docTemplate = `{ "CategoryOne": { "type": "object", "properties": { - "FatherId": { + "AccountId": { "type": "integer" }, "Icon": { @@ -3961,12 +3966,15 @@ const docTemplate = `{ } }, "IncomeExpense": { - "type": "object", - "properties": { - "Income_expense": { - "$ref": "#/definitions/IncomeExpense" - } - } + "type": "string", + "enum": [ + "income", + "expense" + ], + "x-enum-varnames": [ + "Income", + "Expense" + ] }, "List-AccountDetail": { "type": "object", @@ -4297,7 +4305,15 @@ const docTemplate = `{ "type": "string" }, "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "enum": [ + "income", + "expense" + ], + "allOf": [ + { + "$ref": "#/definitions/IncomeExpense" + } + ] }, "StartTime": { "type": "string" @@ -4306,25 +4322,15 @@ const docTemplate = `{ }, "TransactionCategoryAmountRank": { "type": "object", - "required": [ - "AccountId", - "IncomeExpense" - ], "properties": { - "AccountId": { + "Amount": { "type": "integer" }, - "EndTime": { - "type": "string" + "Category": { + "$ref": "#/definitions/CategoryOne" }, - "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" - }, - "Limit": { + "Count": { "type": "integer" - }, - "StartTime": { - "type": "string" } } }, @@ -4350,26 +4356,14 @@ const docTemplate = `{ }, "TransactionDayStatistic": { "type": "object", - "required": [ - "AccountId" - ], "properties": { - "AccountId": { + "Amount": { "type": "integer" }, - "CategoryIds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "EndTime": { - "type": "string" - }, - "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "Count": { + "type": "integer" }, - "StartTime": { + "Date": { "type": "string" } } @@ -4487,7 +4481,15 @@ const docTemplate = `{ "type": "string" }, "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "enum": [ + "income", + "expense" + ], + "allOf": [ + { + "$ref": "#/definitions/IncomeExpense" + } + ] }, "MaximumAmount": { "type": "integer", @@ -4539,6 +4541,12 @@ const docTemplate = `{ "TransactionTimingConfig": { "type": "object", "properties": { + "CreatedAt": { + "type": "string" + }, + "Id": { + "type": "integer" + }, "NextTime": { "type": "string" }, @@ -4548,8 +4556,11 @@ const docTemplate = `{ "Type": { "$ref": "#/definitions/transactionModel.TimingType" }, - "UserId": { - "type": "integer" + "UpdatedAt": { + "type": "string" + }, + "Username": { + "type": "string" } } }, @@ -4631,16 +4642,7 @@ const docTemplate = `{ } }, "UserGetAccountInvitationList": { - "type": "object", - "properties": { - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - } - } + "type": "object" }, "UserHome": { "type": "object", @@ -4773,13 +4775,6 @@ const docTemplate = `{ "Id": { "type": "integer" }, - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - }, "Username": { "type": "string" } diff --git a/docs/swagger.json b/docs/swagger.json index 6655ea62..ce0659a8 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3461,13 +3461,6 @@ "Invitee": { "type": "integer" }, - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - }, "Role": { "$ref": "#/definitions/accountModel.UserRole" } @@ -3493,8 +3486,20 @@ "AccountMapping": { "type": "object", "properties": { - "AccountId": { + "CreateTime": { + "type": "string" + }, + "Id": { "type": "integer" + }, + "MainAccount": { + "$ref": "#/definitions/AccountOne" + }, + "RelatedAccount": { + "$ref": "#/definitions/AccountDetail" + }, + "UpdateTime": { + "type": "string" } } }, @@ -3826,7 +3831,7 @@ "CategoryOne": { "type": "object", "properties": { - "FatherId": { + "AccountId": { "type": "integer" }, "Icon": { @@ -3953,12 +3958,15 @@ } }, "IncomeExpense": { - "type": "object", - "properties": { - "Income_expense": { - "$ref": "#/definitions/IncomeExpense" - } - } + "type": "string", + "enum": [ + "income", + "expense" + ], + "x-enum-varnames": [ + "Income", + "Expense" + ] }, "List-AccountDetail": { "type": "object", @@ -4289,7 +4297,15 @@ "type": "string" }, "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "enum": [ + "income", + "expense" + ], + "allOf": [ + { + "$ref": "#/definitions/IncomeExpense" + } + ] }, "StartTime": { "type": "string" @@ -4298,25 +4314,15 @@ }, "TransactionCategoryAmountRank": { "type": "object", - "required": [ - "AccountId", - "IncomeExpense" - ], "properties": { - "AccountId": { + "Amount": { "type": "integer" }, - "EndTime": { - "type": "string" + "Category": { + "$ref": "#/definitions/CategoryOne" }, - "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" - }, - "Limit": { + "Count": { "type": "integer" - }, - "StartTime": { - "type": "string" } } }, @@ -4342,26 +4348,14 @@ }, "TransactionDayStatistic": { "type": "object", - "required": [ - "AccountId" - ], "properties": { - "AccountId": { + "Amount": { "type": "integer" }, - "CategoryIds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "EndTime": { - "type": "string" - }, - "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "Count": { + "type": "integer" }, - "StartTime": { + "Date": { "type": "string" } } @@ -4479,7 +4473,15 @@ "type": "string" }, "IncomeExpense": { - "$ref": "#/definitions/IncomeExpense" + "enum": [ + "income", + "expense" + ], + "allOf": [ + { + "$ref": "#/definitions/IncomeExpense" + } + ] }, "MaximumAmount": { "type": "integer", @@ -4531,6 +4533,12 @@ "TransactionTimingConfig": { "type": "object", "properties": { + "CreatedAt": { + "type": "string" + }, + "Id": { + "type": "integer" + }, "NextTime": { "type": "string" }, @@ -4540,8 +4548,11 @@ "Type": { "$ref": "#/definitions/transactionModel.TimingType" }, - "UserId": { - "type": "integer" + "UpdatedAt": { + "type": "string" + }, + "Username": { + "type": "string" } } }, @@ -4623,16 +4634,7 @@ } }, "UserGetAccountInvitationList": { - "type": "object", - "properties": { - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - } - } + "type": "object" }, "UserHome": { "type": "object", @@ -4765,13 +4767,6 @@ "Id": { "type": "integer" }, - "Limit": { - "type": "integer" - }, - "Offset": { - "type": "integer", - "minimum": 0 - }, "Username": { "type": "string" } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 91fb3bb6..f57a111e 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -48,11 +48,6 @@ definitions: type: integer Invitee: type: integer - Limit: - type: integer - Offset: - minimum: 0 - type: integer Role: $ref: '#/definitions/accountModel.UserRole' required: @@ -71,8 +66,16 @@ definitions: type: object AccountMapping: properties: - AccountId: + CreateTime: + type: string + Id: type: integer + MainAccount: + $ref: '#/definitions/AccountOne' + RelatedAccount: + $ref: '#/definitions/AccountDetail' + UpdateTime: + type: string type: object AccountOne: properties: @@ -286,7 +289,7 @@ definitions: type: object CategoryOne: properties: - FatherId: + AccountId: type: integer Icon: type: string @@ -368,10 +371,13 @@ definitions: type: integer type: object IncomeExpense: - properties: - Income_expense: - $ref: '#/definitions/IncomeExpense' - type: object + enum: + - income + - expense + type: string + x-enum-varnames: + - Income + - Expense List-AccountDetail: properties: List: @@ -581,7 +587,11 @@ definitions: EndTime: type: string IncomeExpense: - $ref: '#/definitions/IncomeExpense' + allOf: + - $ref: '#/definitions/IncomeExpense' + enum: + - income + - expense StartTime: type: string required: @@ -590,19 +600,12 @@ definitions: type: object TransactionCategoryAmountRank: properties: - AccountId: + Amount: type: integer - EndTime: - type: string - IncomeExpense: - $ref: '#/definitions/IncomeExpense' - Limit: + Category: + $ref: '#/definitions/CategoryOne' + Count: type: integer - StartTime: - type: string - required: - - AccountId - - IncomeExpense type: object TransactionCreateOne: properties: @@ -619,20 +622,12 @@ definitions: type: object TransactionDayStatistic: properties: - AccountId: + Amount: type: integer - CategoryIds: - items: - type: integer - type: array - EndTime: - type: string - IncomeExpense: - $ref: '#/definitions/IncomeExpense' - StartTime: + Count: + type: integer + Date: type: string - required: - - AccountId type: object TransactionDetail: properties: @@ -707,7 +702,11 @@ definitions: EndTime: type: string IncomeExpense: - $ref: '#/definitions/IncomeExpense' + allOf: + - $ref: '#/definitions/IncomeExpense' + enum: + - income + - expense MaximumAmount: minimum: 0 type: integer @@ -743,14 +742,20 @@ definitions: type: object TransactionTimingConfig: properties: + CreatedAt: + type: string + Id: + type: integer NextTime: type: string OffsetDays: type: integer Type: $ref: '#/definitions/transactionModel.TimingType' - UserId: - type: integer + UpdatedAt: + type: string + Username: + type: string type: object TransactionTotal: properties: @@ -803,12 +808,6 @@ definitions: $ref: '#/definitions/UserInfo' type: object UserGetAccountInvitationList: - properties: - Limit: - type: integer - Offset: - minimum: 0 - type: integer type: object UserHome: properties: @@ -895,11 +894,6 @@ definitions: properties: Id: type: integer - Limit: - type: integer - Offset: - minimum: 0 - type: integer Username: type: string required: