create Entity.js class