chore: update auth and portal
This commit is contained in:
@@ -1702,6 +1702,208 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/coupons": {
|
||||
"get": {
|
||||
"description": "List coupon templates",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List coupons",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Type (fix_amount/discount)",
|
||||
"name": "type",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Status (active/expired)",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Keyword",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Create coupon template",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Create coupon",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Coupon form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponCreateForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/coupons/{id}": {
|
||||
"get": {
|
||||
"description": "Get coupon template detail",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Get coupon",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Coupon ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "Update coupon template",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Update coupon",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Coupon ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Coupon form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponUpdateForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/coupons/{id}/grant": {
|
||||
"post": {
|
||||
"description": "Grant coupon to users",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Grant coupon",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Coupon ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Grant form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponGrantForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Granted",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/dashboard": {
|
||||
"get": {
|
||||
"description": "Get creator dashboard stats",
|
||||
@@ -2272,6 +2474,76 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/me/coupons/available": {
|
||||
"get": {
|
||||
"description": "List coupons available for the given order amount",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"UserCenter"
|
||||
],
|
||||
"summary": "List available coupons",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Order amount (cents)",
|
||||
"name": "amount",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.UserCouponItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/me/coupons/receive": {
|
||||
"post": {
|
||||
"description": "Receive a coupon by coupon_id",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"UserCenter"
|
||||
],
|
||||
"summary": "Receive coupon",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Receive form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.CouponReceiveForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.UserCouponItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/me/favorites": {
|
||||
"get": {
|
||||
"description": "Get favorites",
|
||||
@@ -4181,6 +4453,166 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CouponCreateForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "Description 优惠券描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"end_at": {
|
||||
"description": "EndAt 过期时间(RFC3339,可为空)。",
|
||||
"type": "string"
|
||||
},
|
||||
"max_discount": {
|
||||
"description": "MaxDiscount 折扣券最高抵扣金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"min_order_amount": {
|
||||
"description": "MinOrderAmount 使用门槛金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"start_at": {
|
||||
"description": "StartAt 生效时间(RFC3339,可为空)。",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"description": "Title 优惠券标题。",
|
||||
"type": "string"
|
||||
},
|
||||
"total_quantity": {
|
||||
"description": "TotalQuantity 发行总量(0 表示不限量)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type 优惠券类型(fix_amount/discount)。",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value 优惠券面值(分/折扣百分比)。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CouponGrantForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user_ids": {
|
||||
"description": "UserIDs 领取用户ID集合。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CouponItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"description": "CreatedAt 创建时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Description 优惠券描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"end_at": {
|
||||
"description": "EndAt 过期时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 券模板ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"max_discount": {
|
||||
"description": "MaxDiscount 折扣券最高抵扣金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"min_order_amount": {
|
||||
"description": "MinOrderAmount 使用门槛金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"start_at": {
|
||||
"description": "StartAt 生效时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"description": "Title 优惠券标题。",
|
||||
"type": "string"
|
||||
},
|
||||
"total_quantity": {
|
||||
"description": "TotalQuantity 发行总量。",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type 优惠券类型(fix_amount/discount)。",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "UpdatedAt 更新时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"used_quantity": {
|
||||
"description": "UsedQuantity 已使用数量。",
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value 优惠券面值(分/折扣百分比)。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CouponReceiveForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"coupon_id": {
|
||||
"description": "CouponID 券模板ID。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CouponUpdateForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "Description 优惠券描述(为空表示不修改)。",
|
||||
"type": "string"
|
||||
},
|
||||
"end_at": {
|
||||
"description": "EndAt 过期时间(RFC3339,可为空)。",
|
||||
"type": "string"
|
||||
},
|
||||
"max_discount": {
|
||||
"description": "MaxDiscount 折扣券最高抵扣金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"min_order_amount": {
|
||||
"description": "MinOrderAmount 使用门槛金额(分)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"start_at": {
|
||||
"description": "StartAt 生效时间(RFC3339,可为空)。",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"description": "Title 优惠券标题(为空表示不修改)。",
|
||||
"type": "string"
|
||||
},
|
||||
"total_quantity": {
|
||||
"description": "TotalQuantity 发行总量(0 表示不限量)。",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type 优惠券类型(fix_amount/discount)。",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value 优惠券面值(分/折扣百分比)。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.DashboardStats": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user