mirror of
https://github.com/BiPhan4/DefiHackathon-2022.git
synced 2025-04-02 10:41:42 -04:00
32 lines
751 B
Rust
32 lines
751 B
Rust
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use cosmwasm_std::Addr;
|
|
use cw_storage_plus::{Item, Map}; //import map and figure out how to use it
|
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
|
|
pub struct State {
|
|
pub count: i32,
|
|
pub owner: Addr,
|
|
}
|
|
|
|
pub struct User {
|
|
pub name: String,
|
|
pub address: Addr,
|
|
}
|
|
|
|
pub const STATE: Item<State> = Item::new("state");
|
|
|
|
pub const CUSTOMERS: Map<&str, User> = Map::new("customers");
|
|
/*
|
|
add states:
|
|
|
|
1 - the bill(s) / item
|
|
2 - the customers /map
|
|
3 - Need to figure out a way to store money that we've taken from users. Third state is item again?
|
|
|
|
1 - how to use map and item to store customers or any state
|
|
2 - how to display bill to user
|
|
|
|
Hello
|
|
*/
|