artifact
artifacts table: a project’s documents, such as specs and ADRs.Model is one row. New, Patch and Filter carry the input of a create, an update and a list.
struct Model
pub struct ModelA persistent document (spec, ADR, design doc, etc.) within a project.
| Field | Type | Description |
|---|---|---|
archived_at |
Option<DateTime<Utc>> | When the artifact was archived, or None if still active. |
body |
String | Markdown body; skipped during serialization because it is stored and synced separately. |
created_at |
DateTime<Utc> | When the artifact was first inserted. |
id |
Id | Stable identifier assigned at creation. |
metadata |
Value | Free-form JSON object for user-defined metadata. |
project_id |
Id | Project this artifact belongs to. |
title |
String | Short human-readable title. |
updated_at |
DateTime<Utc> | When the artifact was last modified. |
Implements Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, TryFrom<Row>.
Model::archived_at
pub fn archived_at(&self) -> &Option<DateTime<Utc>>When the artifact was archived, or None if still active.
| Parameter | Type | Description |
|---|---|---|
| returns | &Option<DateTime<Utc>> |
Model::body
pub fn body(&self) -> &StringMarkdown body; skipped during serialization because it is stored and synced separately.
| Parameter | Type | Description |
|---|---|---|
| returns | &String |
Model::created_at
pub fn created_at(&self) -> &DateTime<Utc>When the artifact was first inserted.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::id
pub fn id(&self) -> &IdStable identifier assigned at creation.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::metadata
pub fn metadata(&self) -> &ValueFree-form JSON object for user-defined metadata.
| Parameter | Type | Description |
|---|---|---|
| returns | &Value |
Model::project_id
pub fn project_id(&self) -> &IdProject this artifact belongs to.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::title
pub fn title(&self) -> &StringShort human-readable title.
| Parameter | Type | Description |
|---|---|---|
| returns | &String |
Model::updated_at
pub fn updated_at(&self) -> &DateTime<Utc>When the artifact was last modified.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::is_archived
pub fn is_archived(&self) -> boolWhether this artifact is archived.
| Parameter | Type | Description |
|---|---|---|
| returns | bool | true when archived_at is set. |
struct New
pub struct NewParameters for creating a new artifact.
| Field | Type | Description |
|---|---|---|
body |
String | Markdown body content. |
metadata |
Option<Value> | Optional user-defined metadata merged into the new row. |
title |
String | Short human-readable title. |
Implements Clone, Debug, Default, Deserialize<'de>, Serialize.
struct Patch
pub struct PatchOptional fields for updating an existing artifact.
| Field | Type | Description |
|---|---|---|
body |
Option<String> | Replacement markdown body. |
metadata |
Option<Value> | Replacement metadata object; overwrites the stored value when set. |
title |
Option<String> | Replacement title. |
Implements Clone, Debug, Default, Deserialize<'de>, Serialize.
struct Filter
pub struct FilterCriteria for filtering artifacts.