-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3001b9
commit ee775a1
Showing
6 changed files
with
38 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters