UNPKG

@compas/code-gen

Version:

Generate various boring parts of your server

54 lines (53 loc) 1.49 kB
export class ObjectType extends TypeBuilder { static baseData: { validator: { allowNull: boolean; strict: boolean; }; shortName: undefined; relations: never[]; }; constructor(group: any, name: any); internalKeys: {}; internalRelations: any[]; /** * @param {Record<string, import("../../types/advanced-types.d.ts").TypeBuilderLike>} obj * @returns {ObjectType} */ keys(obj: Record<string, import("../../types/advanced-types.d.ts").TypeBuilderLike>): ObjectType; /** * @returns {ObjectType} */ loose(): ObjectType; /** * Specify shortName used in the query builders * * @param {string} value * @returns {ObjectType} */ shortName(value: string): ObjectType; /** * @param {{ * withSoftDeletes?: boolean, * withDates?: boolean, * withPrimaryKey?: boolean, * isView?: boolean, * schema?: string * }} [options = {}] * @returns {ObjectType} */ enableQueries(options?: { withSoftDeletes?: boolean; withDates?: boolean; withPrimaryKey?: boolean; isView?: boolean; schema?: string; }): ObjectType; /** * @param {...RelationType} relations * @returns {ObjectType} */ relations(...relations: RelationType[]): ObjectType; } import { TypeBuilder } from "./TypeBuilder.js"; import { RelationType } from "./RelationType.js";