add address book name &

add share address book
This commit is contained in:
ljw
2024-10-28 14:19:30 +08:00
parent e833c0e0c0
commit 8ee93b530d
32 changed files with 2927 additions and 124 deletions

View File

@@ -346,6 +346,554 @@ const docTemplateadmin = `{
}
}
},
"/admin/address_book_collection/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建地址簿集合",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "创建地址簿集合",
"parameters": [
{
"description": "地址簿集合信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿集合删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合删除",
"parameters": [
{
"description": "地址簿集合信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿集合详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿集合列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "是否是我的",
"name": "is_my",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollectionList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿集合编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合编辑",
"parameters": [
{
"description": "地址簿集合信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection_rule/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建地址簿集合规则",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "创建地址簿集合规则",
"parameters": [
{
"description": "地址簿集合规则信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollectionRule"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection_rule/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿集合规则删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合规则删除",
"parameters": [
{
"description": "地址簿集合规则信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollectionRule"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection_rule/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿集合规则详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合规则详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollectionRule"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection_rule/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿集合规则列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合规则列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "是否是我的",
"name": "is_my",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "地址簿集合id",
"name": "collection_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollectionList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book_collection_rule/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿集合规则编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "地址簿集合规则编辑",
"parameters": [
{
"description": "地址簿集合规则信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AddressBookCollectionRule"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookCollection"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/app-config": {
"get": {
"security": [
@@ -2480,6 +3028,9 @@ const docTemplateadmin = `{
"alias": {
"type": "string"
},
"collection_id": {
"type": "integer"
},
"forceAlwaysRelay": {
"type": "boolean"
},
@@ -2701,6 +3252,9 @@ const docTemplateadmin = `{
"name"
],
"properties": {
"collection_id": {
"type": "integer"
},
"color": {
"type": "integer"
},
@@ -2788,6 +3342,12 @@ const docTemplateadmin = `{
"alias": {
"type": "string"
},
"collection": {
"$ref": "#/definitions/model.AddressBookCollection"
},
"collection_id": {
"type": "integer"
},
"created_at": {
"type": "string"
},
@@ -2844,6 +3404,90 @@ const docTemplateadmin = `{
}
}
},
"model.AddressBookCollection": {
"type": "object",
"required": [
"name"
],
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
},
"model.AddressBookCollectionList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.AddressBookCollection"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.AddressBookCollectionRule": {
"type": "object",
"required": [
"collection_id",
"rule",
"to_id",
"type"
],
"properties": {
"collection_id": {
"type": "integer"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"rule": {
"description": "0: 无 1: 读 2: 读写 3: 完全控制",
"type": "integer",
"maximum": 3,
"minimum": 1
},
"to_id": {
"type": "integer"
},
"type": {
"description": "1: 个人 2: 群组",
"type": "integer",
"maximum": 2,
"minimum": 1
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
},
"model.AddressBookList": {
"type": "object",
"properties": {
@@ -3221,6 +3865,12 @@ const docTemplateadmin = `{
"model.Tag": {
"type": "object",
"properties": {
"collection": {
"$ref": "#/definitions/model.AddressBookCollection"
},
"collection_id": {
"type": "integer"
},
"color": {
"description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度后面6位表示颜色, 可以转成rgba",
"type": "integer"