From dd0bcac16a31e43d4cafa10a05068fce21193c74 Mon Sep 17 00:00:00 2001 From: oldboy Date: Tue, 21 Oct 2025 15:13:09 -0500 Subject: [PATCH] On branch master Initial commit Changes to be committed: new file: .gitignore new file: Cargo.lock new file: Cargo.toml new file: src/main.rs new file: src/type_crate.rs --- .gitignore | 1 + Cargo.lock | 7 +++++++ Cargo.toml | 6 ++++++ src/main.rs | 16 ++++++++++++++++ src/type_crate.rs | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs create mode 100644 src/type_crate.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..e2375d1 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "typl" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c463137 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "typl" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..c387224 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,16 @@ +mod type_crate; + +/*implement a deferment method for client_id +* as well as a constructor. +* note_1 -- if no contact_name, assume client_name == contact_name +* note_2 -- if is_biller, follow up with billing contact info.*/ + +fn main() { + let client_id: u32 = 24799; + let name: &str = "Jonny"; + let contact_name: &str = "Johnathon"; + let is_biller: bool = false; + let jonny: type_crate::Client = + type_crate::Client::new(client_id, name, contact_name, is_biller); + println!("Test Client:: {:#?}", jonny) +} diff --git a/src/type_crate.rs b/src/type_crate.rs new file mode 100644 index 0000000..04d84cd --- /dev/null +++ b/src/type_crate.rs @@ -0,0 +1,48 @@ +#[derive(Debug)] +pub struct Client { + id: u32, + name: String, + contact: String, + billing: bool, +} + +impl Client { + pub fn new(id: u32, name: &str, contact: &str, billing: bool) -> Self { + Self { + id: id, + name: name.to_owned(), + contact: contact.to_owned(), + billing: billing, + } + } +} + +struct Fee { + entry_date: u64, + hours: f32, + worked_hours: f32, + timekeeper: u16, + rate: u16, + amount: f32, + description: String, +} + +struct Timekeeper { + name: String, + number: u16, + initials: String, + level: u8, + splits: Option>, +} + +struct Cost { + entry_date: u64, + tcode: u8, + amount: f32, + description: String, +} + +enum Charge { + Cost, + Fee, +}