add database config and base model class