Skip to content

Commit

Permalink
Updates for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyhedral committed Jan 4, 2025
1 parent b3001b9 commit ee775a1
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ jobs:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --verbose --release --target ${{ matrix.target }}
- name: publish-docs
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[package]
name = "sweetrpg-model-core"
description = "Core model definitions for SweetRPG"
version = "0.0.1"
edition = "2021"
license-file = "LICENSE"
readme = "README.md"
repository = "https://github.com/sweetrpg/model-core.rs"
homepage = "https://github.com/sweetrpg/model-core"
keywords = ["sweetrpg", "model", "core"]
categories = ["game", "rpg", "sweetrpg", "model", "core"]
authors = ["Paul Schifferer <[email protected]>"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
18 changes: 9 additions & 9 deletions src/models/auditable.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use std::time::Instant;
use std::option::Option;
use serde::{Serialize, Deserialize};

///
#[derive(Debug)]
/// Base struct for auditable fields.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Auditable {
created_at: Instant,
created_by: String,
updated_at: Instant,
updated_by: String,
deleted_at: Option<Instant>,
deleted_by: Option<String>,
pub created_at: u64,
pub created_by: String,
pub updated_at: u64,
pub updated_by: String,
pub deleted_at: Option<u64>,
pub deleted_by: Option<String>,
}
12 changes: 7 additions & 5 deletions src/models/property.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
///
#[derive(Debug)]
use serde::{Serialize, Deserialize};

/// Struct for properties.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Property {
name: String,
kind: String,
value: String,
pub name: String,
pub kind: String,
pub value: String,
}
10 changes: 6 additions & 4 deletions src/models/tag.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
///
#[derive(Debug)]
use serde::{Serialize, Deserialize};

/// A struct for tags.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Tag {
name: String,
value: String,
pub name: String,
pub value: String,
}
4 changes: 2 additions & 2 deletions src/vo/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ use serde::{Serialize, Deserialize};
/// A value object representing a tag.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TagVO {
name: String,
value: String,
pub name: String,
pub value: String,
}

0 comments on commit ee775a1

Please sign in to comment.