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

View File

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

View File

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

View File

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