REQ-3540: 添加校验
This commit is contained in:
parent
cb6cb3cab7
commit
cdac07f9a1
@ -2,6 +2,7 @@
|
||||
package cn.axzo.nanopart.doc.api.domain;
|
||||
|
||||
import cn.axzo.nanopart.doc.api.enums.DatabaseScope;
|
||||
import cn.axzo.nanopart.doc.api.enums.DatabaseType;
|
||||
import cn.axzo.nanopart.doc.api.enums.IndexNodeContext;
|
||||
|
||||
/**
|
||||
@ -23,6 +24,7 @@ public interface IndexNodeScope {
|
||||
switch (context()) {
|
||||
case FILE_TEMPLATE:
|
||||
case TEMPLATE_DATABASE:
|
||||
return false;
|
||||
default:
|
||||
return scope().getChildNameDuplicatable();
|
||||
}
|
||||
@ -34,7 +36,7 @@ public interface IndexNodeScope {
|
||||
case TEMPLATE_DATABASE:
|
||||
return true;
|
||||
default:
|
||||
return scope().getLimitChildrenCount();
|
||||
return scope().getDatabaseType() != DatabaseType.NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user