编译器原来漏掉了sortAttr中的外键
This commit is contained in:
parent
01b33e0d88
commit
6ad150a500
|
|
@ -36,6 +36,8 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
relationId: number;
|
||||
pathId: number;
|
||||
deActions: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
modiId: number;
|
||||
entity: number;
|
||||
entityId: number;
|
||||
[k: string]: any;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ export type OpSortAttr = Partial<{
|
|||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
action: number;
|
||||
operatorId: number;
|
||||
targetEntity: number;
|
||||
bornAt: number;
|
||||
logId: number;
|
||||
iState: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
operId: number;
|
||||
entity: number;
|
||||
entityId: number;
|
||||
[k: string]: any;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
sourceRelationId: number;
|
||||
pathId: number;
|
||||
destRelationId: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export type OpSortAttr = Partial<{
|
|||
name: number;
|
||||
nickname: number;
|
||||
password: number;
|
||||
refId: number;
|
||||
userState: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,11 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
uegId: number;
|
||||
userId: number;
|
||||
relationId: number;
|
||||
claimEntityId: number;
|
||||
userRelationId: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ export type OpSortAttr = Partial<{
|
|||
$$createAt$$: number;
|
||||
$$seq$$: number;
|
||||
$$updateAt$$: number;
|
||||
userId: number;
|
||||
relationId: number;
|
||||
entity: number;
|
||||
entityId: number;
|
||||
[k: string]: any;
|
||||
|
|
|
|||
|
|
@ -2532,7 +2532,7 @@ function _constructOpSortAttr(statements, entity) {
|
|||
const text2 = text === 'Schema' ? entity : text;
|
||||
const manyToOneItem = manyToOneSet && manyToOneSet.find(([refEntity]) => refEntity === text2);
|
||||
if (manyToOneItem) {
|
||||
factory.createPropertySignature(undefined, factory.createIdentifier(`${name.text}Id`), undefined, factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword));
|
||||
members.push(factory.createPropertySignature(undefined, factory.createIdentifier(`${name.text}Id`), undefined, factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword)));
|
||||
}
|
||||
else if (!['Object'].includes(text)) {
|
||||
// todo 对State的专门处理
|
||||
|
|
|
|||
|
|
@ -4022,11 +4022,13 @@ function _constructOpSortAttr(statements: Array<ts.Statement>, entity: string) {
|
|||
([refEntity]) => refEntity === text2
|
||||
);
|
||||
if (manyToOneItem) {
|
||||
factory.createPropertySignature(
|
||||
undefined,
|
||||
factory.createIdentifier(`${(<ts.Identifier>name).text}Id`),
|
||||
undefined,
|
||||
factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword)
|
||||
members.push(
|
||||
factory.createPropertySignature(
|
||||
undefined,
|
||||
factory.createIdentifier(`${(<ts.Identifier>name).text}Id`),
|
||||
undefined,
|
||||
factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword)
|
||||
)
|
||||
);
|
||||
}
|
||||
else if (!['Object'].includes(text)) {
|
||||
|
|
@ -8994,7 +8996,7 @@ function _outputEntityDict(outputDir: string, printer: ts.Printer) {
|
|||
foreignKeySet[entityName].forEach(
|
||||
(foreignKey) => {
|
||||
const aggrKeyNode = _getAggrKey(entityNameLc, foreignKey);
|
||||
const aggrNode = factory.createTypeReferenceNode(
|
||||
const aggrNode = factory.createTypeReferenceNode(
|
||||
factory.createIdentifier("AggregationResult"),
|
||||
[factory.createTypeReferenceNode(
|
||||
factory.createIdentifier("Omit"),
|
||||
|
|
@ -9004,7 +9006,7 @@ function _outputEntityDict(outputDir: string, printer: ts.Printer) {
|
|||
]
|
||||
)]
|
||||
);
|
||||
|
||||
|
||||
if (typeof aggrKeyNode === 'string') {
|
||||
members.push(
|
||||
factory.createPropertySignature(
|
||||
|
|
@ -9618,7 +9620,7 @@ function _outputEntityDict(outputDir: string, printer: ts.Printer) {
|
|||
);
|
||||
break;
|
||||
}
|
||||
case 'excludeUpdate': {
|
||||
case 'excludeUpdate': {
|
||||
cascadeCreateElements.push(
|
||||
factory.createPropertySignature(
|
||||
undefined,
|
||||
|
|
@ -9673,7 +9675,7 @@ function _outputEntityDict(outputDir: string, printer: ts.Printer) {
|
|||
// 多对一
|
||||
if (manyToOneSet) {
|
||||
for (const one of manyToOneSet) {
|
||||
addManyToOneCascade(one[0], one[1]);
|
||||
addManyToOneCascade(one[0], one[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9816,7 +9818,7 @@ function _outputEntityDict(outputDir: string, printer: ts.Printer) {
|
|||
);
|
||||
break;
|
||||
}
|
||||
case 'excludeUpdate': {
|
||||
case 'excludeUpdate': {
|
||||
cascadeCreateElements.push(
|
||||
factory.createPropertySignature(
|
||||
undefined,
|
||||
|
|
|
|||
Loading…
Reference in New Issue