database handling moved to subdir (db)

* lib.rs: update local name bindings and module path (use, pub mod)
* db/mod.rs: functions, tests
* db/schemas: database schemas created via diesel
* db/models: types und enums generated for db handling
* db/types: traits and implementations te serialize, deserialize

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2019-11-08 15:20:48 +01:00
parent cd2a03daae
commit aa33dab582
6 changed files with 666 additions and 37 deletions

View File

@@ -1,9 +1,26 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2019 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: 0BSD, MIT
*/
extern crate chrono;
extern crate dotenv;
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
pub mod db;
// This function adds two integers (given as arguments) and returns the sum.
//
// # Examples
//
// ```
// assert_eq!(8, advotracker::internal_adder(4, 4));
// assert_eq!(8, advotracker_backend::internal_adder(4, 4));
// ```
fn internal_adder(a: i32, b: i32) -> i32 {