added model repository with validations and relations