summaryrefslogtreecommitdiffstats
path: root/cli/src/main.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-07-29 13:23:28 +0200
committerGustav Sörnäs <gustav@sornas.net>2021-07-29 13:23:28 +0200
commit60cc74d344a97b368e7b31b37d3c29aa49fc1602 (patch)
tree79eb61b3e88847e41ab1af882174fbcf6c147754 /cli/src/main.rs
parent00a865bc08753898c3cdc0d924985f427abb9f74 (diff)
downloadmoney-60cc74d344a97b368e7b31b37d3c29aa49fc1602.tar.gz
model -> transaction/store
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(),