# UserTicketCategoryService
> 工单分类服务

---

## createUserTicketCategory
> 创建分类

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/createUserTicketCategory`
- RPC：`rpc createUserTicketCategory(CreateUserTicketCategoryRequest) returns (CreateUserTicketCategoryResponse);`

**请求对象 (`CreateUserTicketCategoryRequest`)**

```json
{
  "name": "string // 名称"
}
```

**响应对象 (`CreateUserTicketCategoryResponse`)**

```json
{
  "userTicketCategoryId": "int64"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/createUserTicketCategory" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## deleteUserTicketCategory
> 删除分类

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/deleteUserTicketCategory`
- RPC：`rpc deleteUserTicketCategory(DeleteUserTicketCategoryRequest) returns (RPCSuccess);`

**请求对象 (`DeleteUserTicketCategoryRequest`)**

```json
{
  "userTicketCategoryId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/deleteUserTicketCategory" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllAvailableUserTicketCategories
> 查找所有启用中的分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/findAllAvailableUserTicketCategories`
- RPC：`rpc findAllAvailableUserTicketCategories(FindAllAvailableUserTicketCategoriesRequest) returns (FindAllAvailableUserTicketCategoriesResponse);`

**请求对象 (`FindAllAvailableUserTicketCategoriesRequest`)**

```json
{}
```

**响应对象 (`FindAllAvailableUserTicketCategoriesResponse`)**

```json
{
  "userTicketCategories": "[]UserTicketCategory"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/findAllAvailableUserTicketCategories" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllUserTicketCategories
> 查找所有分类

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/findAllUserTicketCategories`
- RPC：`rpc findAllUserTicketCategories(FindAllUserTicketCategoriesRequest) returns (FindAllUserTicketCategoriesResponse);`

**请求对象 (`FindAllUserTicketCategoriesRequest`)**

```json
{}
```

**响应对象 (`FindAllUserTicketCategoriesResponse`)**

```json
{
  "userTicketCategories": "[]UserTicketCategory"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/findAllUserTicketCategories" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findUserTicketCategory
> 查询单个分类

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/findUserTicketCategory`
- RPC：`rpc findUserTicketCategory(FindUserTicketCategoryRequest) returns (FindUserTicketCategoryResponse);`

**请求对象 (`FindUserTicketCategoryRequest`)**

```json
{
  "userTicketCategoryId": "int64"
}
```

**响应对象 (`FindUserTicketCategoryResponse`)**

```json
{
  "userTicketCategory": "UserTicketCategory"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/findUserTicketCategory" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateUserTicketCategory
> 修改分类

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/UserTicketCategoryService/updateUserTicketCategory`
- RPC：`rpc updateUserTicketCategory(UpdateUserTicketCategoryRequest) returns (RPCSuccess);`

**请求对象 (`UpdateUserTicketCategoryRequest`)**

```json
{
  "userTicketCategoryId": "int64",
  "name": "string // 名称",
  "isOn": "bool // 是否启用"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/UserTicketCategoryService/updateUserTicketCategory" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
