# NSRouteCategoryService
> 线路分类服务

---

## createNSRouteCategory
> 创建线路分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/createNSRouteCategory`
- RPC：`rpc createNSRouteCategory(CreateNSRouteCategoryRequest) returns (CreateNSRouteCategoryResponse);`

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

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

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

```json
{
  "nsRouteCategoryId": "int64"
}
```

**调用示例**

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

---

## deleteNSRouteCategory
> 删除线路分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/deleteNSRouteCategory`
- RPC：`rpc deleteNSRouteCategory(DeleteNSRouteCategoryRequest) returns (RPCSuccess);`

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

```json
{
  "nsRouteCategoryId": "int64"
}
```

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

```json
{}
```

**调用示例**

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

---

## findAllNSRouteCategories
> 列出所有线路分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/findAllNSRouteCategories`
- RPC：`rpc findAllNSRouteCategories(FindAllNSRouteCategoriesRequest) returns (FindAllNSRouteCategoriesResponse);`

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

```json
{}
```

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

```json
{
  "nsRouteCategories": "[]NSRouteCategory"
}
```

**调用示例**

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

---

## findNSRouteCategory
> 查找单个线路分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/findNSRouteCategory`
- RPC：`rpc findNSRouteCategory(FindNSRouteCategoryRequest) returns (FindNSRouteCategoryResponse);`

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

```json
{
  "nsRouteCategoryId": "int64"
}
```

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

```json
{
  "nsRouteCategory": "NSRouteCategory"
}
```

**调用示例**

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

---

## updateNSRouteCategory
> 修改线路分类

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/updateNSRouteCategory`
- RPC：`rpc updateNSRouteCategory(UpdateNSRouteCategoryRequest) returns (RPCSuccess);`

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

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

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

```json
{}
```

**调用示例**

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

---

## updateNSRouteCategoryOrders
> 对线路分类进行排序

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/NSRouteCategoryService/updateNSRouteCategoryOrders`
- RPC：`rpc updateNSRouteCategoryOrders(UpdateNSRouteCategoryOrders) returns (RPCSuccess);`

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

```json
{
  "nsRouteCategoryIds": "[]int64"
}
```

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

```json
{}
```

**调用示例**

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

---
