added a base model and a cron job for cleaning db