diff --git a/lib/src/domain/command.rs b/lib/src/domain/command.rs new file mode 100644 index 0000000..eeea41d --- /dev/null +++ b/lib/src/domain/command.rs @@ -0,0 +1,21 @@ +/* + TIN - Time Tracking Application + Copyright (C) 2021 Julio Biason + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +pub trait Command { + fn execute(&self) -> Result<(), ()>; +} diff --git a/lib/src/domain/create_event.rs b/lib/src/domain/create_event.rs new file mode 100644 index 0000000..de80ef1 --- /dev/null +++ b/lib/src/domain/create_event.rs @@ -0,0 +1,19 @@ +/* + TIN - Time Tracking Application + Copyright (C) 2020-2021 Julio Biason + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +struct CreateEvent {} diff --git a/lib/src/domain/mod.rs b/lib/src/domain/mod.rs new file mode 100644 index 0000000..a087a39 --- /dev/null +++ b/lib/src/domain/mod.rs @@ -0,0 +1,20 @@ +/* + TIN - Time Tracking Application + Copyright (C) 2021 Julio Biason + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +pub(crate) mod command; +pub mod project; diff --git a/lib/src/domain/project/create_project.rs b/lib/src/domain/project/create_project.rs new file mode 100644 index 0000000..911a40b --- /dev/null +++ b/lib/src/domain/project/create_project.rs @@ -0,0 +1,27 @@ +/* + TIN - Time tracking application + Copyright (C) 2021 Julio Biason + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +use crate::domain::command::Command; + +struct CreateProject(String); + +impl Command for CreateProject { + fn execute(&self) -> Result<(), ()> { + Ok(()) + } +} diff --git a/lib/src/domain/project/mod.rs b/lib/src/domain/project/mod.rs new file mode 100644 index 0000000..37ecbe0 --- /dev/null +++ b/lib/src/domain/project/mod.rs @@ -0,0 +1 @@ +pub mod create_project;