feat:
--Added Read Registered nodes API --Added DEL unregister Node
This commit is contained in:
1 parent
7a0e8c7cd6
commit
9977440c2d
4 files changed
+149
-18
No files matched your search
@@ -1,17 +1,27 @@
|
||||
from sqlalchemy import Column, BigInteger, Integer, String
|
||||
from database import Base
|
||||
|
||||
import uuid
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
|
||||
class NodeInterface(Base):
|
||||
__tablename__ = "fastAPI_node_interface"
|
||||
|
||||
uuid = Column(
|
||||
UUID(as_uuid=True),
|
||||
primary_key=True,
|
||||
default=uuid.uuid4,
|
||||
nullable=False
|
||||
)
|
||||
|
||||
if_id = Column(
|
||||
BigInteger,
|
||||
primary_key=True
|
||||
unique=True,
|
||||
nullable=False
|
||||
)
|
||||
|
||||
if_name = Column(
|
||||
String,
|
||||
unique=True,
|
||||
nullable=False
|
||||
)
|
||||
|
||||
@@ -22,6 +32,7 @@ class NodeInterface(Base):
|
||||
|
||||
host = Column(
|
||||
String,
|
||||
unique=True,
|
||||
nullable=False
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user