私は現在、ユーザーがウェブサイトからMinecraftサーバーを制御できるアプリケーションを作成しています(サーバーにインストールしたプラグインと対話します)。各サーバーが独自のユーザー権限グループを定義できるようにするための適切な設計を考え出そうとしています。最後に、各サーバーが選択して、作成したグループに割り当てるための事前定義された選択肢のリスト (私のプラグインが処理方法を知っているもの) があります。この Web サイトの 1 人のユーザーがサーバー パネルに複数のグループを持つことができ、ユーザーを複数のサーバー パネルに割り当てることができるようにすることを目指しています。
私が現在思いついたデータベースのレイアウトは次のとおりです。
Table: Roles (will hold the predefined roles)
Columns:
serverTypeId (to distinguish between roles allowed for the 2 versions of minecraft)
roleId (the role's unique id, primary key)
roleName (some name to distinguish the role's purpose)
Table: ServerGroup (will hold the custom per server groups)
Columns:
serverId (the server's unique id)
groupId (the server role's unique id, primary key)
groupName (name given to group, like Staff, Admin, etc)
roleList (a csv list of roleId's from the Roles table)
Table: ServerPermissions
Columns:
serverId (the server's unique id)
serverGroupId (the server's groupId that this user belongs to)
userId (the user's id that is unique to the whole website)
これを行うより良い方法はありますか?これは私が思いついた最良の方法です。私は SQL に精通しておらず、改善する方法を探しています。