Open NubeDev opened 4 years ago
code
is already unique
or combine unique
depends on entity
:
edge
: code
is uniquenetwork
: code
+ edge
+ protocol
is unique.
Due to edge
is only one in each rubix
, so code
+ protocol
can understand as unique. In which protocol
is one of BACNet
, Modbus
, etcdevice
: code
+ DEVICE_TYPE
is unique.
DeviceType
is one of machine
or GATEWAY
or Equipment
, etcpoint
: code
+ edge
+ network
is unique.
Due to edge
is only one in each rubix
, so code
+ network
can understand as unique
Make it so the user can't add the same name twice
This should be the same for the networks and most other things like equipment, things, networks