pub struct KnowledgeArticle {Show 21 fields
pub id: Uuid,
pub number: String,
pub title: String,
pub article_type: KnowledgeType,
pub status: KnowledgeStatus,
pub domain: Option<String>,
pub summary: String,
pub content: String,
pub author: String,
pub reviewers: Vec<String>,
pub last_reviewed: Option<DateTime<Utc>>,
pub review_frequency: Option<ReviewFrequency>,
pub audience: Vec<String>,
pub skill_level: Option<SkillLevel>,
pub linked_assets: Vec<AssetLink>,
pub linked_decisions: Vec<Uuid>,
pub related_articles: Vec<RelatedArticle>,
pub tags: Vec<Tag>,
pub notes: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Knowledge Base Article
Represents a knowledge article that can be categorized by domain, type, and audience.
Fields§
§id: UuidUnique identifier for the article
number: StringArticle number (KB-0001, KB-0002, etc.)
title: StringArticle title
article_type: KnowledgeTypeType of article
status: KnowledgeStatusPublication status
domain: Option<String>Domain this article belongs to (optional)
summary: StringBrief summary of the article
content: StringFull article content in Markdown
Article author (email or name)
reviewers: Vec<String>List of reviewers
last_reviewed: Option<DateTime<Utc>>Date of last review
review_frequency: Option<ReviewFrequency>How often the article should be reviewed
audience: Vec<String>Target audience for the article
skill_level: Option<SkillLevel>Required skill level
linked_assets: Vec<AssetLink>Assets referenced by this article
linked_decisions: Vec<Uuid>UUIDs of related decisions
Related articles
Tags for categorization
notes: Option<String>Additional notes
created_at: DateTime<Utc>Creation timestamp
updated_at: DateTime<Utc>Last modification timestamp
Implementations§
Source§impl KnowledgeArticle
impl KnowledgeArticle
Sourcepub fn new(
number: u32,
title: impl Into<String>,
summary: impl Into<String>,
content: impl Into<String>,
author: impl Into<String>,
) -> Self
pub fn new( number: u32, title: impl Into<String>, summary: impl Into<String>, content: impl Into<String>, author: impl Into<String>, ) -> Self
Create a new knowledge article with required fields
Sourcepub fn generate_id(number: u32) -> Uuid
pub fn generate_id(number: u32) -> Uuid
Generate a deterministic UUID for an article based on its number
Sourcepub fn parse_number(&self) -> Option<u32>
pub fn parse_number(&self) -> Option<u32>
Parse the numeric part of the article number
Sourcepub fn with_type(self, article_type: KnowledgeType) -> Self
pub fn with_type(self, article_type: KnowledgeType) -> Self
Set the article type
Sourcepub fn with_status(self, status: KnowledgeStatus) -> Self
pub fn with_status(self, status: KnowledgeStatus) -> Self
Set the article status
Sourcepub fn with_domain(self, domain: impl Into<String>) -> Self
pub fn with_domain(self, domain: impl Into<String>) -> Self
Set the domain
Sourcepub fn add_reviewer(self, reviewer: impl Into<String>) -> Self
pub fn add_reviewer(self, reviewer: impl Into<String>) -> Self
Add a reviewer
Sourcepub fn with_review_frequency(self, frequency: ReviewFrequency) -> Self
pub fn with_review_frequency(self, frequency: ReviewFrequency) -> Self
Set review frequency
Sourcepub fn add_audience(self, audience: impl Into<String>) -> Self
pub fn add_audience(self, audience: impl Into<String>) -> Self
Add an audience
Sourcepub fn with_skill_level(self, level: SkillLevel) -> Self
pub fn with_skill_level(self, level: SkillLevel) -> Self
Set skill level
Sourcepub fn add_asset_link(self, link: AssetLink) -> Self
pub fn add_asset_link(self, link: AssetLink) -> Self
Add an asset link
Sourcepub fn link_decision(self, decision_id: Uuid) -> Self
pub fn link_decision(self, decision_id: Uuid) -> Self
Link to a decision
Add a related article
Sourcepub fn mark_reviewed(&mut self)
pub fn mark_reviewed(&mut self)
Mark the article as reviewed
Sourcepub fn filename(&self, workspace_name: &str) -> String
pub fn filename(&self, workspace_name: &str) -> String
Generate the YAML filename for this article
Sourcepub fn markdown_filename(&self) -> String
pub fn markdown_filename(&self) -> String
Generate the Markdown filename for this article
Trait Implementations§
Source§impl Clone for KnowledgeArticle
impl Clone for KnowledgeArticle
Source§fn clone(&self) -> KnowledgeArticle
fn clone(&self) -> KnowledgeArticle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more