This commit is contained in:
Jicheng Lu 2024-09-20 14:24:51 -05:00
parent 1ce774a0bc
commit 0b145e3801
2 changed files with 5 additions and 5 deletions

View file

@ -48,7 +48,7 @@ public class DocMetaRefData
[JsonPropertyName("url")]
public string Url { get; set; }
[JsonPropertyName("json_content")]
[JsonPropertyName("data")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? JsonContent { get; set; }
public IDictionary<string, string>? Data { get; set; }
}

View file

@ -8,7 +8,7 @@ public class KnowledgeFileMetaRefMongoModel
public string Name { get; set; }
public string Type { get; set; }
public string Url { get; set; }
public string? JsonContent { get; set; }
public IDictionary<string, string>? Data { get; set; }
public static KnowledgeFileMetaRefMongoModel? ToMongoModel(DocMetaRefData? model)
{
@ -20,7 +20,7 @@ public class KnowledgeFileMetaRefMongoModel
Name = model.Name,
Type = model.Type,
Url = model.Url,
JsonContent = model.JsonContent
Data = model.Data
};
}
@ -34,7 +34,7 @@ public class KnowledgeFileMetaRefMongoModel
Name = model.Name,
Type = model.Type,
Url = model.Url,
JsonContent = model.JsonContent
Data = model.Data
};
}
}