List/dictionary of a type within a type? Or alternative?

This makes sense. I’m asking all of this because I want to know the best way to handle a group of people. Does a group need a groupID which would be handled by principal? Or can members of the group be deemed admins without it and be able to make changes?

I’m also thinking about how to deal with things that would then contain that group. For example:

public type Guild = {
    guildName: Text;
    guildDesc: Text;
    guildMembers: [Person];
    assignedQuests: [Quest];
};
    
public type Quest = {
    questName: Text;
    questGiver: Text;
    questReward: Text;
    questStatus: Text;
    questAcceptors: [Guild];
    questComplete: Bool;
};

In this example, ideally, everyone should be able to see each member of each Guild assigned to a Quest. But only the individuals in the Quest should be able to make changes to the questStatus. How can this be done? Would the quest need a questID? How can you make it possible that Guilds assigned to a Quest can be seen, and Quests assigned to a Group can be seen (publicly). But these things can only be edited by a Person in a Group thats assigned to a Quest? If that makes any sense at all, my apologies!

2 Likes