POST /api/v1/plant-species
请求体
{
"commonName": "龟背竹",
"scientificName": "Monstera deliciosa",
"genus": "Monstera",
"speciesEpithet": "deliciosa",
"family": "Araceae",
"description": "原产墨西哥热带雨林的多年生常绿藤本植物...",
"coverMediaId": 200,
"careDifficulty": 1,
"lightRequirement": 2,
"wateringFrequencyGuide": "7-10天/次",
"humidityRequirement": "喜欢高湿度环境",
"toxicityLevel": 3,
"categoryIds": [1, 2]
}
| 字段 | 类型 | 必填 | 约束 | 说明 |
|---|---|---|---|---|
commonName |
string |
是 | — | 常用名(英文,存入主表) |
scientificName |
string |
否 | — | 学名 |
genus |
string |
否 | — | 属名 |
speciesEpithet |
string |
否 | — | 种加词 |
family |
string |
否 | — | 科名 |
description |
string |
否 | — | 品种描述(英文,存入主表) |
coverMediaId |
number |
否 | — | 封面媒体文件 ID |
careDifficulty |
number |
否 | 见 CareDifficulty 枚举 | 养护难度 |
lightRequirement |
number |
否 | 见 LightRequirement 枚举 | 光照需求 |
wateringFrequencyGuide |
string |
否 | — | 浇水频率指南(英文,存入主表) |
humidityRequirement |
string |
否 | — | 湿度需求 |
toxicityLevel |
number |
否 | 见 ToxicityLevel 枚举 | 毒性等级 |
categoryIds |
array |
否 | — | 所属分类 ID 集合 |
响应
{
"code": 200,
"message": "success",
"data": {
"id": 1,
"commonName": "龟背竹",
"scientificName": "Monstera deliciosa",
"genus": "Monstera",
"speciesEpithet": "deliciosa",
"family": "Araceae",
"description": "原产墨西哥热带雨林的多年生常绿藤本植物...",
"coverUrl": "https://api.floriax.cn/api/v1/media/202605/a1b2c3d4e5f6.png",
"careDifficulty": 1,
"lightRequirement": 2,
"wateringFrequencyGuide": "7-10天/次",
"humidityRequirement": "喜欢高湿度环境",
"toxicityLevel": 3,
"categories": [
{
"id": 1,
"name": "室内植物"
},
{ "id": 2, "name": "观叶植物" }
]
},
"requestId": "...",
"timestamp": 1747123456789
}
| 字段 | 类型 | 说明 |
|---|---|---|
id |
number |
种类 ID |
commonName |
string |
常用名 |
scientificName |
string |
学名 |
genus |
string |
属名 |
speciesEpithet |
string |
种加词 |
family |
string |
科名 |
description |
string |
品种描述 |
coverUrl |
string |
封面图访问地址,未设置时不出现此字段 |
careDifficulty |
number |
养护难度 |
lightRequirement |
number |
光照需求 |
wateringFrequencyGuide |
string |
浇水频率指南 |
humidityRequirement |
string |
湿度需求 |
toxicityLevel |
number |
毒性等级 |
categories |
array |
所属分类列表,元素含 id、name |