Attendence management system

I want to make attendence system where mainly attendence for which will be used for Emp id,name , date, check in and check out time where the date, check in and out fields should be connected to leaves which will contain emp id , name and leaves types and applied and pending leaves.

I'm new to the FnO/ax can any one suggest me flow or idea how all this things should work together??