17 lines
No EOL
497 B
Rust
17 lines
No EOL
497 B
Rust
use std::collections::HashMap;
|
|
use bonsaidb::core::schema::Collection;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Collection, Clone)]
|
|
#[collection(name = "customerviews")]
|
|
pub struct CustomerView {
|
|
pub sync_id: String,
|
|
pub products: HashMap<CustomerViewProductSlice, u64>,
|
|
pub price_total: f64
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)]
|
|
pub struct CustomerViewProductSlice {
|
|
pub name: String,
|
|
pub price_usd: u64
|
|
} |