Skip to content

Commit 3ed995f

Browse files
committed
Continue database impl
1 parent ea72fa2 commit 3ed995f

File tree

22 files changed

+141
-134
lines changed

22 files changed

+141
-134
lines changed

Cargo.lock

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandpolis-audit/src/lib.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,18 @@
11
use native_db::*;
22
use native_model::{Model, native_model};
33
use sandpolis_core::InstanceId;
4-
use sandpolis_database::DbTimestamp;
5-
use serde::{Deserialize, Serialize};
4+
use sandpolis_macros::data;
65

7-
#[derive(Serialize, Deserialize, PartialEq, Debug)]
8-
#[native_model(id = 2, version = 1)]
9-
#[native_db]
6+
#[data]
107
pub struct SignatureDetectionData {
11-
#[primary_key]
12-
pub id: u32,
13-
148
#[secondary_key]
159
pub instance_id: InstanceId,
16-
17-
#[secondary_key]
18-
pub timestamp: DbTimestamp,
1910
}
2011

21-
#[derive(Serialize, Deserialize, PartialEq, Debug)]
22-
#[native_model(id = 4, version = 1)]
23-
#[native_db]
12+
#[data]
2413
pub struct EventDetectionData {
25-
#[primary_key]
26-
pub id: u32,
27-
2814
#[secondary_key]
2915
pub instance_id: InstanceId,
30-
31-
#[secondary_key]
32-
pub timestamp: DbTimestamp,
3316
}
3417

3518
/// Indicates the degree to which the user is currently participating in their

sandpolis-client/src/gui/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ use bevy::{
99
window::{AppLifecycle, WindowMode},
1010
};
1111
use bevy_rapier2d::prelude::*;
12-
use sandpolis_database::Database;
13-
use sandpolis_instance::Layer;
1412

1513
pub mod input;
1614
pub mod node;
@@ -22,6 +20,7 @@ pub struct CurrentLayer(Layer);
2220
#[derive(Resource, Deref, DerefMut)]
2321
pub struct ZoomLevel(f32);
2422

23+
// TODO move to main crate
2524
/// Initialize and start rendering the UI.
2625
pub async fn main(config: Configuration, state: InstanceState) -> Result<()> {
2726
let mut app = App::new();

0 commit comments

Comments
 (0)