Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Database Schema Creation #6

Open
RafaDSan opened this issue Dec 23, 2024 · 1 comment
Open

feat: Database Schema Creation #6

RafaDSan opened this issue Dec 23, 2024 · 1 comment
Assignees

Comments

@RafaDSan
Copy link
Collaborator

RafaDSan commented Dec 23, 2024

Necessary to have done the task #3
Initial thought of the entities schemas:

User

	address (primary key)
	role (enum: user, manager, owner)
	created_at

Community

	id/address (coming from blockchain)
	name (coming from blockchain)
	description (coming from blockchain)
	creator_address
	status (active/hidden)
	total_members (coming from blockchain / indexing through db)
	total_badges (coming from blockchain +  indexing through db)

Badges

	 id (from blockchain)
	 community_id (foreign key)
	 type (predefined/custom)
	 name (indexed from blockchain)
	 score_value (indexed from blockchain)
	 status (active/inactive) - when user "deletes" badges

CommunityMember

	 community_id (foreign key)
	 user_address (foreign key)
	 joined_at
	 delete when a user leaves
@RafaDSan RafaDSan self-assigned this Dec 23, 2024
@RafaDSan
Copy link
Collaborator Author

P1 as the schemas are a necessary element in the data relationship between the platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant