name | root | output | ignore | questions | ||||||
---|---|---|---|---|---|---|---|---|---|---|
model |
./src |
/model/ |
|
import type { ContentStatus } from "@/model/common/const/content-status";
export type {{ inputs.model | pascal }} = {
id: string;
adminLabel: string;
creationStatus: "DRAFT" | "CONFIRMED";
};
import type { {{ inputs.model | pascal }} } from "./type";
export const {{ inputs.model | snake | upper }}_MOCK_DATA: {{ inputs.model | pascal }}[] = [];
export const {{ inputs.model | camel }}PathMapping = {
pathToId: (path: string) => path.match(/\/{{ inputs.path }}\/(.+)/)?.[1],
idToPath: (id: string) => `/{{ inputs.path }}/${id}`,
indexPath: "/{{ inputs.path }}",
};
# {{ inputs.label }}
{{ read output.abs | before "} as const;" }}
{{ inputs.model | pascal }}: {
label: "{{ inputs.label }}",
},
{{ read output.abs | after "} as const;" -1 }}