mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-03-28 17:42:56 +01:00
Add member-node association support
Members can now have multiple associated nodes, each with a public_key and node_role (e.g., 'chat', 'repeater'). This replaces the single public_key field on members with a one-to-many relationship. Changes: - Add MemberNode model for member-node associations - Update Member model to remove public_key, add nodes relationship - Update Pydantic schemas with MemberNodeCreate/MemberNodeRead - Update member_import.py to handle nodes list in seed files - Update API routes to handle nodes in create/update/read operations - Add Alembic migration to create member_nodes table and migrate data - Update example seed file with new format
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
# Example members seed file
|
||||
# Each member can have multiple nodes with different roles (chat, repeater, etc.)
|
||||
members:
|
||||
- name: Example Member
|
||||
callsign: N0CALL
|
||||
role: Network Operator
|
||||
description: Example member entry
|
||||
description: Example member entry with multiple nodes
|
||||
nodes:
|
||||
- public_key: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
node_role: chat
|
||||
- public_key: fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
|
||||
node_role: repeater
|
||||
- name: Simple Member
|
||||
callsign: N0CALL2
|
||||
role: Observer
|
||||
description: Member without any nodes
|
||||
|
||||
Reference in New Issue
Block a user