Base solution for your next web application
Open Closed

Host vs Default Tenants #762


User avatar
0
codemonkey21 created

I'm trying to figure out where to assign my web users. I want my site to have several types of users. Think of Yelp.

End users: Every day people signing up and using the site to browse, connect, add venues, write reviews, etc. Business users: Register a business (tenant) and then claim their venue/business.

Should be end user be a host user or a default tenant user? These users search the site for venues and write reviews about them. If the venue does not exist, they can add the venue. A venue entity has the IMayHaveTenant interface. This then throws an exception because my end user is current a Default (tenant id 1) user but the venue has a null tenant id. So there is a mis-match.

When a business claims a venue, the venue then gets a tenant id for that business. Is that going to stop host/default users from viewing and writing reviews on a claimed business?

I guess my question is, should a newly created venue be a host tenant of null or the default tenant of 1 since that's what my end users are. Or do I toss out the interface on the venue entity and skip the data filter. I can create an alternate method to claim a business. Or do my end users all need to be host users?

Sorry that was like six questions. :)


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    I did not understood it completely, but...

    If your daily users are independent from any tenant and can review and venue of and tenant, than they should be host users and have some 'DailyUser' role.

    Can host have venues? If not, venue should be IMustHaveTenant instead of IMayHaveTenant. Thus, it will be simpler since host users can reach IMustHaveTenant entities by default.

    I hope this helps :)

  • User Avatar
    0
    codemonkey21 created

    Let's put it differently... Like in a real world scenario.

    Today I ordered a pizza from a venue called Famous Pizza in my town and it was horrible. I have heard about this website where I can write reviews about restaurants. So I join the web site (host user) because I want to write a review about how bad the pizza was at Famous Pizza. So I search my town and don't find the venue "Famous Pizza". The site suggests to create the venue. I create the venue and write my review. Life goes on, I invite my friends to join the web site, etc.

    Some undetermined time later, the owner of Famous Pizza hears about the website and sees all these reviews about their pizza shop. So they join the website (business user / tenant user) and create a business account (tenant). In turn they 'claim' their venue thru some validation method (phone / email / etc). They now can edit the profile for their pizza place and respond to the reviews that customers are leaving on their profile. But maybe Famous Pizza is a chain and they have multiple pizza venues to claim. Using editions, they could upgrade their account to manage several venues. Maybe provide each general manager of a pizza parlor it's own login (tenant user) to respond to reviews in their respective place.

    So with this model, most of the users are free to come, browse the site, join, write reviews, add new venues, check in, etc. Business users are tenant users and belong to an account that can claim a venue(s). However, there could be a period of time between the user creating the venue and the venue owner claiming the profile, meaning it wouldn't have a tenant in that time period.

    Sorry for the long explaination, but I want to make sure I'm using the interfaces and default tenant as designed or if I have to work a different solution. A perfect example of this model would be <a class="postlink" href="http://www.yelp.com">http://www.yelp.com</a>.