Added base class and entity class

Added base class and entity class