Created Event Entity to store data in tables as objects in php