summaryrefslogtreecommitdiffstats
path: root/cli/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/main.rs')
-rw-r--r--cli/src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 18d422a..10fa02c 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -4,7 +4,8 @@ use std::path::PathBuf;
use std::str::FromStr;
use structopt::StructOpt;
-mod model;
+mod store;
+mod transaction;
//TODO relative ("yesterday", "-2d", etc)
fn parse_date(s: &str) -> Result<NaiveDate, String> {
@@ -15,7 +16,7 @@ fn parse_date(s: &str) -> Result<NaiveDate, String> {
#[derive(StructOpt)]
enum Command {
Insert {
- kind: model::TransactionKind,
+ kind: transaction::TransactionKind,
#[structopt(long)]
account: String,
@@ -61,7 +62,7 @@ struct Mn {
}
fn main() {
- let mut store = model::Store::open(PathBuf::from("store")).unwrap();
+ let mut store = store::Store::open(PathBuf::from("store")).unwrap();
let args = Mn::from_args();
eprintln!("{:?}", args);
match args.command {
@@ -73,7 +74,7 @@ fn main() {
description,
date,
} => {
- let transaction = model::Transaction {
+ let transaction = transaction::Transaction {
kind,
to: account,
from: "Default".to_string(),