为actionAuth增加了paths属性

This commit is contained in:
Xu Chang 2023-08-08 19:07:03 +08:00
parent ff5deb19ac
commit 8282f37cd8
4 changed files with 14 additions and 0 deletions

View File

@ -7,9 +7,11 @@ import * as Relation from "../Relation/Schema";
import * as ModiEntity from "../ModiEntity/Schema";
import * as OperEntity from "../OperEntity/Schema";
declare type Actions = string[];
declare type Paths = string[];
export declare type OpSchema = EntityShape & {
relationId?: ForeignKey<"relation"> | null;
path: String<256>;
paths: Paths;
destEntity: String<32>;
deActions: Actions;
};
@ -17,6 +19,7 @@ export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
relationId?: ForeignKey<"relation"> | null;
path: String<256>;
paths: Paths;
destEntity: String<32>;
deActions: Actions;
relation?: Relation.Schema | null;
@ -35,6 +38,7 @@ declare type AttrFilter = {
relationId: Q_StringValue;
relation: Relation.Filter;
path: Q_StringValue;
paths: JsonFilter<Paths>;
destEntity: Q_StringValue;
deActions: JsonFilter<Actions>;
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
@ -51,6 +55,7 @@ export declare type Projection = {
relationId?: number;
relation?: Relation.Projection;
path?: number;
paths?: number | JsonProjection<Paths>;
destEntity?: number;
deActions?: number | JsonProjection<Actions>;
modiEntity$entity?: ModiEntity.Selection & {
@ -86,6 +91,8 @@ export declare type SortAttr = {
relation: Relation.SortAttr;
} | {
path: number;
} | {
paths: number;
} | {
destEntity: number;
} | {

View File

@ -15,6 +15,10 @@ exports.desc = {
length: 256
}
},
paths: {
notNull: true,
type: "object"
},
destEntity: {
notNull: true,
type: "varchar",

View File

@ -2,9 +2,11 @@ import { String } from '../types/DataType';
import { EntityShape } from '../types/Entity';
import { Schema as Relation } from './Relation';
declare type Actions = string[];
declare type Paths = string[];
export interface Schema extends EntityShape {
relation?: Relation;
path: String<256>;
paths: Paths;
destEntity: String<32>;
deActions: Actions;
}

View File

@ -8,6 +8,7 @@ var entityDesc = {
attr: {
relation: '关系',
path: '路径',
paths: '路径',
destEntity: '目标对象',
deActions: '目标对象动作',
},