Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use map #654

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -20,7 +20,7 @@ public class KnowledgeFileMetaRefMongoModel
Name = model.Name,
Type = model.Type,
Url = model.Url,
JsonContent = model.JsonContent
Data = model.Data
};
}

Expand All @@ -34,7 +34,7 @@ public class KnowledgeFileMetaRefMongoModel
Name = model.Name,
Type = model.Type,
Url = model.Url,
JsonContent = model.JsonContent
Data = model.Data
};
}
}