Move checkin and checkout logic to models