cabloy 5.1.61 → 5.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +2 -0
- package/CHANGELOG.md +55 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +158 -12
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +8 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +2 -0
- package/cabloy-docs/ai/skills.md +1 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +12 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +12 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +13 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +2 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +7 -7
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +4 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +1 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +5 -5
- package/cabloy-docs/frontend/command-scene-authoring.md +17 -8
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +27 -30
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +10 -6
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +29 -7
- package/cabloy-docs/frontend/model-architecture.md +38 -2
- package/cabloy-docs/frontend/model-resource-cookbook.md +11 -8
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +22 -2
- package/cabloy-docs/frontend/model-resource-usage-guide.md +22 -6
- package/cabloy-docs/frontend/model-state-guide.md +12 -9
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +12 -4
- package/cabloy-docs/frontend/page-guide.md +9 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +14 -2
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +2 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +571 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +7 -9
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +101 -7
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +8 -2
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +181 -48
- package/cabloy-docs/fullstack/introduction.md +3 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -2
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +4 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +31 -19
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +5 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +4 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +1 -1
- package/cabloy-docs/reference/bean-scene-boilerplates.md +13 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +1 -1
- package/vona/pnpm-lock.yaml +22 -258
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +423 -682
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/render.tsx +5 -3
- package/zova/src/suite/a-home/modules/home-login/src/page/login/render.tsx +5 -3
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +57 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +53 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/package.json +60 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/.metadata/index.ts +137 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/bean/behavior.appModal.tsx +260 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/config/config.ts +39 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/config/locale/en-us.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/config/locale/zh-cn.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/index.ts +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/lib/appModalItem.ts +16 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/lib/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/monkey.ts +38 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/monkeySys.ts +14 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/service/appModal.ts +89 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/types/appModal.ts +52 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/types/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-commands/package.json +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-commands/src/.metadata/index.ts +16 -0
- package/zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.alert.tsx +8 -14
- package/zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.confirm.tsx +10 -7
- package/zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.prompt.tsx +30 -0
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockForm/controller.tsx +5 -3
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite/cabloy-basic/modules/basic-table/package.json +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/bean/tableCell.actionDelete.tsx +4 -2
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
// eslint-disable
|
|
2
|
+
import type { TypeEntityMeta,TypeModelsClassLikeGeneral,TypeSymbolKeyFieldsMore } from 'vona-module-a-orm';
|
|
3
|
+
import type { TypeEntityOptionsFields,TypeControllerOptionsActions } from 'vona-module-a-openapi';
|
|
4
|
+
import type { TableIdentity } from 'table-identity';
|
|
5
|
+
/** entity: begin */
|
|
6
|
+
export * from '../entity/student.tsx';
|
|
7
|
+
import type { IEntityOptionsStudent } from '../entity/student.tsx';
|
|
8
|
+
import 'vona-module-a-orm';
|
|
9
|
+
declare module 'vona-module-a-orm' {
|
|
10
|
+
|
|
11
|
+
export interface IEntityRecord {
|
|
12
|
+
'training-student:student': IEntityOptionsStudent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
declare module 'vona-module-training-student' {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
/** entity: end */
|
|
21
|
+
/** entity: begin */
|
|
22
|
+
import type { EntityStudent } from '../entity/student.tsx';
|
|
23
|
+
export interface IModuleEntity {
|
|
24
|
+
'student': EntityStudentMeta;
|
|
25
|
+
}
|
|
26
|
+
/** entity: end */
|
|
27
|
+
/** entity: begin */
|
|
28
|
+
export type EntityStudentTableName = 'trainingStudent';
|
|
29
|
+
export type EntityStudentMeta=TypeEntityMeta<EntityStudent,EntityStudentTableName>;
|
|
30
|
+
declare module 'vona-module-a-orm' {
|
|
31
|
+
export interface ITableRecord {
|
|
32
|
+
'trainingStudent': EntityStudentMeta;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
declare module 'vona-module-training-student' {
|
|
36
|
+
|
|
37
|
+
export interface IEntityOptionsStudent {
|
|
38
|
+
fields?: TypeEntityOptionsFields<EntityStudent, IEntityOptionsStudent[TypeSymbolKeyFieldsMore]>;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** entity: end */
|
|
42
|
+
/** model: begin */
|
|
43
|
+
export * from '../model/student.ts';
|
|
44
|
+
import type { IModelOptionsStudent } from '../model/student.ts';
|
|
45
|
+
import 'vona-module-a-orm';
|
|
46
|
+
declare module 'vona-module-a-orm' {
|
|
47
|
+
|
|
48
|
+
export interface IModelRecord {
|
|
49
|
+
'training-student:student': IModelOptionsStudent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
declare module 'vona-module-training-student' {
|
|
55
|
+
|
|
56
|
+
export interface ModelStudent {
|
|
57
|
+
/** @internal */
|
|
58
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ModelStudent {
|
|
62
|
+
get $beanFullName(): 'training-student.model.student';
|
|
63
|
+
get $onionName(): 'training-student:student';
|
|
64
|
+
get $onionOptions(): IModelOptionsStudent;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** model: end */
|
|
68
|
+
/** model: begin */
|
|
69
|
+
import type { ModelStudent } from '../model/student.ts';
|
|
70
|
+
export interface IModuleModel {
|
|
71
|
+
'student': ModelStudent;
|
|
72
|
+
}
|
|
73
|
+
/** model: end */
|
|
74
|
+
/** model: begin */
|
|
75
|
+
|
|
76
|
+
import 'vona';
|
|
77
|
+
declare module 'vona' {
|
|
78
|
+
export interface IBeanRecordGeneral {
|
|
79
|
+
'training-student.model.student': ModelStudent;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** model: end */
|
|
83
|
+
/** model: begin */
|
|
84
|
+
import type { IModelGetOptions, IModelMethodOptions, IModelSelectParams, TypeModelSelectAndCount, TypeModelRelationResult, TypeModelWhere, IModelInsertOptions, TypeModelMutateRelationData, IModelDeleteOptions, IModelUpdateOptions, IModelMutateOptions, IModelSelectCountParams, IModelIncrementParams, IModelSelectAggrParams, TypeModelAggrRelationResult, IModelSelectGroupParams, TypeModelGroupRelationResult } from 'vona-module-a-orm';
|
|
85
|
+
import { SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyModelOptions } from 'vona-module-a-orm';
|
|
86
|
+
declare module 'vona-module-training-student' {
|
|
87
|
+
|
|
88
|
+
export interface ModelStudent {
|
|
89
|
+
[SymbolKeyEntity]: EntityStudent;
|
|
90
|
+
[SymbolKeyEntityMeta]: EntityStudentMeta;
|
|
91
|
+
[SymbolKeyModelOptions]: IModelOptionsStudent;
|
|
92
|
+
get<T extends IModelGetOptions<EntityStudent,ModelStudent>>(where: TypeModelWhere<EntityStudent>, options?: T): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T> | undefined>;
|
|
93
|
+
mget<T extends IModelGetOptions<EntityStudent,ModelStudent>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T>[]>;
|
|
94
|
+
selectAndCount<T extends IModelSelectParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelSelectAndCount<EntityStudent, ModelStudent, T>>;
|
|
95
|
+
select<T extends IModelSelectParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T>[]>;
|
|
96
|
+
insert<T extends IModelInsertOptions<EntityStudent,ModelStudent>>(data?: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>, options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T, true>>;
|
|
97
|
+
insertBulk<T extends IModelInsertOptions<EntityStudent,ModelStudent>>(items: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T, true>[]>;
|
|
98
|
+
update<T extends IModelUpdateOptions<EntityStudent,ModelStudent>>(data: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>, options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T>>;
|
|
99
|
+
updateBulk<T extends IModelUpdateOptions<EntityStudent,ModelStudent>>(items: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T>[]>;
|
|
100
|
+
delete<T extends IModelDeleteOptions<EntityStudent,ModelStudent>>(where?: TypeModelWhere<EntityStudent>, options?: T): Promise<void>;
|
|
101
|
+
deleteBulk<T extends IModelDeleteOptions<EntityStudent,ModelStudent>>(ids: TableIdentity[], options?: T): Promise<void>;
|
|
102
|
+
mutate<T extends IModelMutateOptions<EntityStudent,ModelStudent>>(data?: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>, options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T>>;
|
|
103
|
+
mutateBulk<T extends IModelMutateOptions<EntityStudent,ModelStudent>>(items: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T>[]>;
|
|
104
|
+
count<T extends IModelSelectCountParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<string | undefined>;
|
|
105
|
+
increment<T extends IModelIncrementParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<number>;
|
|
106
|
+
decrement<T extends IModelIncrementParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<number>;
|
|
107
|
+
aggregate<T extends IModelSelectAggrParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
108
|
+
group<T extends IModelSelectGroupParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityStudent, T>[]>;
|
|
109
|
+
getById<T extends IModelGetOptions<EntityStudent,ModelStudent>>(id: TableIdentity, options?: T): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T> | undefined>;
|
|
110
|
+
updateById<T extends IModelUpdateOptions<EntityStudent,ModelStudent>>(id: TableIdentity, data: TypeModelMutateRelationData<EntityStudent,ModelStudent, T>, options?: T): Promise<TypeModelMutateRelationData<EntityStudent,ModelStudent, T>>;
|
|
111
|
+
deleteById<T extends IModelDeleteOptions<EntityStudent,ModelStudent>>(id: TableIdentity, options?: T): Promise<void>;
|
|
112
|
+
getByName<T extends IModelGetOptions<EntityStudent,ModelStudent>>(name?: string, options?: T): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T> | undefined>;
|
|
113
|
+
getByNameEqI<T extends IModelGetOptions<EntityStudent,ModelStudent>>(name?: string, options?: T): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T> | undefined>;
|
|
114
|
+
selectByName<T extends IModelSelectParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(name?: string, params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T>[]>;
|
|
115
|
+
selectByNameEqI<T extends IModelSelectParams<EntityStudent,ModelStudent,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(name?: string, params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityStudent, ModelStudent, T>[]>;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
declare module 'vona-module-a-orm' {
|
|
119
|
+
export interface IModelClassRecord {
|
|
120
|
+
'training-student:student': ModelStudent;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** model: end */
|
|
124
|
+
/** service: begin */
|
|
125
|
+
export * from '../service/student.ts';
|
|
126
|
+
|
|
127
|
+
import 'vona-module-a-bean';
|
|
128
|
+
declare module 'vona-module-a-bean' {
|
|
129
|
+
|
|
130
|
+
export interface IServiceRecord {
|
|
131
|
+
'training-student:student': never;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
declare module 'vona-module-training-student' {
|
|
137
|
+
|
|
138
|
+
export interface ServiceStudent {
|
|
139
|
+
/** @internal */
|
|
140
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface ServiceStudent {
|
|
144
|
+
get $beanFullName(): 'training-student.service.student';
|
|
145
|
+
get $onionName(): 'training-student:student';
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** service: end */
|
|
150
|
+
/** service: begin */
|
|
151
|
+
import type { ServiceStudent } from '../service/student.ts';
|
|
152
|
+
export interface IModuleService {
|
|
153
|
+
'student': ServiceStudent;
|
|
154
|
+
}
|
|
155
|
+
/** service: end */
|
|
156
|
+
/** service: begin */
|
|
157
|
+
|
|
158
|
+
import 'vona';
|
|
159
|
+
declare module 'vona' {
|
|
160
|
+
export interface IBeanRecordGeneral {
|
|
161
|
+
'training-student.service.student': ServiceStudent;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** service: end */
|
|
165
|
+
/** meta: begin */
|
|
166
|
+
export * from '../bean/meta.index.ts';
|
|
167
|
+
export * from '../bean/meta.version.ts';
|
|
168
|
+
import type { IMetaOptionsIndex } from 'vona-module-a-index';
|
|
169
|
+
import 'vona-module-a-meta';
|
|
170
|
+
declare module 'vona-module-a-meta' {
|
|
171
|
+
|
|
172
|
+
export interface IMetaRecord {
|
|
173
|
+
'training-student:index': IMetaOptionsIndex;
|
|
174
|
+
'training-student:version': never;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
declare module 'vona-module-training-student' {
|
|
180
|
+
|
|
181
|
+
export interface MetaIndex {
|
|
182
|
+
/** @internal */
|
|
183
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface MetaIndex {
|
|
187
|
+
get $beanFullName(): 'training-student.meta.index';
|
|
188
|
+
get $onionName(): 'training-student:index';
|
|
189
|
+
get $onionOptions(): IMetaOptionsIndex;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface MetaVersion {
|
|
193
|
+
/** @internal */
|
|
194
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface MetaVersion {
|
|
198
|
+
get $beanFullName(): 'training-student.meta.version';
|
|
199
|
+
get $onionName(): 'training-student:version';
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/** meta: end */
|
|
204
|
+
/** dto: begin */
|
|
205
|
+
export * from '../dto/studentCreate.tsx';
|
|
206
|
+
export * from '../dto/studentSelectReq.tsx';
|
|
207
|
+
export * from '../dto/studentSelectRes.tsx';
|
|
208
|
+
export * from '../dto/studentSelectResItem.tsx';
|
|
209
|
+
export * from '../dto/studentSummary.tsx';
|
|
210
|
+
export * from '../dto/studentUpdate.tsx';
|
|
211
|
+
export * from '../dto/studentView.tsx';
|
|
212
|
+
import type { IDtoOptionsStudentCreate } from '../dto/studentCreate.tsx';
|
|
213
|
+
import type { IDtoOptionsStudentSelectReq } from '../dto/studentSelectReq.tsx';
|
|
214
|
+
import type { IDtoOptionsStudentSelectRes } from '../dto/studentSelectRes.tsx';
|
|
215
|
+
import type { IDtoOptionsStudentSelectResItem } from '../dto/studentSelectResItem.tsx';
|
|
216
|
+
import type { IDtoOptionsStudentSummary } from '../dto/studentSummary.tsx';
|
|
217
|
+
import type { IDtoOptionsStudentUpdate } from '../dto/studentUpdate.tsx';
|
|
218
|
+
import type { IDtoOptionsStudentView } from '../dto/studentView.tsx';
|
|
219
|
+
import 'vona-module-a-web';
|
|
220
|
+
declare module 'vona-module-a-web' {
|
|
221
|
+
|
|
222
|
+
export interface IDtoRecord {
|
|
223
|
+
'training-student:studentCreate': IDtoOptionsStudentCreate;
|
|
224
|
+
'training-student:studentSelectReq': IDtoOptionsStudentSelectReq;
|
|
225
|
+
'training-student:studentSelectRes': IDtoOptionsStudentSelectRes;
|
|
226
|
+
'training-student:studentSelectResItem': IDtoOptionsStudentSelectResItem;
|
|
227
|
+
'training-student:studentSummary': IDtoOptionsStudentSummary;
|
|
228
|
+
'training-student:studentUpdate': IDtoOptionsStudentUpdate;
|
|
229
|
+
'training-student:studentView': IDtoOptionsStudentView;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
}
|
|
234
|
+
declare module 'vona-module-training-student' {
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
/** dto: end */
|
|
238
|
+
/** dto: begin */
|
|
239
|
+
import type { DtoStudentCreate } from '../dto/studentCreate.tsx';
|
|
240
|
+
import type { DtoStudentSelectReq } from '../dto/studentSelectReq.tsx';
|
|
241
|
+
import type { DtoStudentSelectRes } from '../dto/studentSelectRes.tsx';
|
|
242
|
+
import type { DtoStudentSelectResItem } from '../dto/studentSelectResItem.tsx';
|
|
243
|
+
import type { DtoStudentSummary } from '../dto/studentSummary.tsx';
|
|
244
|
+
import type { DtoStudentUpdate } from '../dto/studentUpdate.tsx';
|
|
245
|
+
import type { DtoStudentView } from '../dto/studentView.tsx';
|
|
246
|
+
declare module 'vona-module-training-student' {
|
|
247
|
+
|
|
248
|
+
export interface IDtoOptionsStudentCreate {
|
|
249
|
+
fields?: TypeEntityOptionsFields<DtoStudentCreate, IDtoOptionsStudentCreate[TypeSymbolKeyFieldsMore]>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface IDtoOptionsStudentSelectReq {
|
|
253
|
+
fields?: TypeEntityOptionsFields<DtoStudentSelectReq, IDtoOptionsStudentSelectReq[TypeSymbolKeyFieldsMore]>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface IDtoOptionsStudentSelectRes {
|
|
257
|
+
fields?: TypeEntityOptionsFields<DtoStudentSelectRes, IDtoOptionsStudentSelectRes[TypeSymbolKeyFieldsMore]>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface IDtoOptionsStudentSelectResItem {
|
|
261
|
+
fields?: TypeEntityOptionsFields<DtoStudentSelectResItem, IDtoOptionsStudentSelectResItem[TypeSymbolKeyFieldsMore]>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface IDtoOptionsStudentSummary {
|
|
265
|
+
fields?: TypeEntityOptionsFields<DtoStudentSummary, IDtoOptionsStudentSummary[TypeSymbolKeyFieldsMore]>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface IDtoOptionsStudentUpdate {
|
|
269
|
+
fields?: TypeEntityOptionsFields<DtoStudentUpdate, IDtoOptionsStudentUpdate[TypeSymbolKeyFieldsMore]>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface IDtoOptionsStudentView {
|
|
273
|
+
fields?: TypeEntityOptionsFields<DtoStudentView, IDtoOptionsStudentView[TypeSymbolKeyFieldsMore]>;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/** dto: end */
|
|
277
|
+
/** controller: begin */
|
|
278
|
+
export * from '../controller/student.ts';
|
|
279
|
+
import type { IControllerOptionsStudent } from '../controller/student.ts';
|
|
280
|
+
import 'vona-module-a-web';
|
|
281
|
+
declare module 'vona-module-a-web' {
|
|
282
|
+
|
|
283
|
+
export interface IControllerRecord {
|
|
284
|
+
'training-student:student': IControllerOptionsStudent;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
}
|
|
289
|
+
declare module 'vona-module-training-student' {
|
|
290
|
+
|
|
291
|
+
export interface ControllerStudent {
|
|
292
|
+
/** @internal */
|
|
293
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface ControllerStudent {
|
|
297
|
+
get $beanFullName(): 'training-student.controller.student';
|
|
298
|
+
get $onionName(): 'training-student:student';
|
|
299
|
+
get $onionOptions(): IControllerOptionsStudent;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/** controller: end */
|
|
303
|
+
/** controller: begin */
|
|
304
|
+
// @ts-ignore ignore
|
|
305
|
+
import type { ControllerStudent } from '../controller/student.ts';
|
|
306
|
+
declare module 'vona-module-training-student' {
|
|
307
|
+
|
|
308
|
+
export interface IControllerOptionsStudent {
|
|
309
|
+
actions?: TypeControllerOptionsActions<ControllerStudent>;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
declare module 'vona-module-a-web' {
|
|
313
|
+
export interface IApiPathPostRecord{
|
|
314
|
+
'/training/student': undefined;
|
|
315
|
+
}
|
|
316
|
+
export interface IApiPathGetRecord{
|
|
317
|
+
'/training/student': undefined;
|
|
318
|
+
'/training/student/:id': undefined;
|
|
319
|
+
'/training/student/summary/:id': undefined;
|
|
320
|
+
}
|
|
321
|
+
export interface IApiPathPatchRecord{
|
|
322
|
+
'/training/student/:id': undefined;
|
|
323
|
+
}
|
|
324
|
+
export interface IApiPathDeleteRecord{
|
|
325
|
+
'/training/student/:id': undefined;
|
|
326
|
+
'/training/student/deleteForce/:id': undefined;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
import 'vona-module-a-openapi';
|
|
331
|
+
declare module 'vona-module-a-openapi' {
|
|
332
|
+
export interface IResourceRecord {
|
|
333
|
+
'training-student:student': never;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/** controller: end */
|
|
338
|
+
/** ssrMenu: begin */
|
|
339
|
+
export * from '../bean/ssrMenu.student.ts';
|
|
340
|
+
import type { ISsrMenuOptionsStudent } from '../bean/ssrMenu.student.ts';
|
|
341
|
+
import 'vona-module-a-ssr';
|
|
342
|
+
declare module 'vona-module-a-ssr' {
|
|
343
|
+
|
|
344
|
+
export interface ISsrMenuRecord {
|
|
345
|
+
'training-student:student': ISsrMenuOptionsStudent;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
}
|
|
350
|
+
declare module 'vona-module-training-student' {
|
|
351
|
+
|
|
352
|
+
export interface SsrMenuStudent {
|
|
353
|
+
/** @internal */
|
|
354
|
+
get scope(): ScopeModuleTrainingStudent;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface SsrMenuStudent {
|
|
358
|
+
get $beanFullName(): 'training-student.ssrMenu.student';
|
|
359
|
+
get $onionName(): 'training-student:student';
|
|
360
|
+
get $onionOptions(): ISsrMenuOptionsStudent;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/** ssrMenu: end */
|
|
364
|
+
/** locale: begin */
|
|
365
|
+
import { locales } from './locales.ts';
|
|
366
|
+
/** locale: end */
|
|
367
|
+
/** scope: begin */
|
|
368
|
+
import { BeanScopeBase, type BeanScopeUtil, type TypeModuleLocales, type TypeLocaleBase } from 'vona';
|
|
369
|
+
import { Scope } from 'vona-module-a-bean';
|
|
370
|
+
|
|
371
|
+
@Scope()
|
|
372
|
+
export class ScopeModuleTrainingStudent extends BeanScopeBase {}
|
|
373
|
+
|
|
374
|
+
export interface ScopeModuleTrainingStudent {
|
|
375
|
+
util: BeanScopeUtil;
|
|
376
|
+
locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
|
|
377
|
+
entity: IModuleEntity;
|
|
378
|
+
model: IModuleModel;
|
|
379
|
+
service: IModuleService;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
import 'vona';
|
|
383
|
+
declare module 'vona' {
|
|
384
|
+
export interface IBeanScopeRecord {
|
|
385
|
+
'training-student': ScopeModuleTrainingStudent;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export interface IBeanScopeContainer {
|
|
389
|
+
trainingStudent: ScopeModuleTrainingStudent;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
export interface IBeanScopeLocale {
|
|
395
|
+
'training-student': (typeof locales)[TypeLocaleBase];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
}
|
|
400
|
+
/** scope: end */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TypeLocaleBase } from 'vona';
|
|
2
|
+
|
|
3
|
+
import { $makeLocaleMagic } from 'vona';
|
|
4
|
+
|
|
5
|
+
import locale_en_us from '../config/locale/en-us.ts';
|
|
6
|
+
import locale_zh_cn from '../config/locale/zh-cn.ts';
|
|
7
|
+
|
|
8
|
+
export const locales = {
|
|
9
|
+
'en-us': locale_en_us,
|
|
10
|
+
'zh-cn': locale_zh_cn,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(
|
|
14
|
+
key: K,
|
|
15
|
+
...args: any[]
|
|
16
|
+
): any {
|
|
17
|
+
return $makeLocaleMagic(`training-student::${key}`, ...args);
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IMetaOptionsIndex } from 'vona-module-a-index';
|
|
2
|
+
|
|
3
|
+
import { BeanBase } from 'vona';
|
|
4
|
+
import { Meta } from 'vona-module-a-meta';
|
|
5
|
+
import { $tableColumns } from 'vona-module-a-ormutils';
|
|
6
|
+
|
|
7
|
+
@Meta<IMetaOptionsIndex>({
|
|
8
|
+
indexes: {
|
|
9
|
+
...$tableColumns('trainingStudent', 'name'),
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
export class MetaIndex extends BeanBase {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IMetaVersionUpdate, IMetaVersionUpdateOptions } from 'vona-module-a-version';
|
|
2
|
+
|
|
3
|
+
import { BeanBase } from 'vona';
|
|
4
|
+
import { Meta } from 'vona-module-a-meta';
|
|
5
|
+
|
|
6
|
+
@Meta()
|
|
7
|
+
export class MetaVersion extends BeanBase implements IMetaVersionUpdate {
|
|
8
|
+
async update(options: IMetaVersionUpdateOptions) {
|
|
9
|
+
if (options.version === 1) {
|
|
10
|
+
const entityStudent = this.scope.entity.student;
|
|
11
|
+
await this.bean.model.createTable(entityStudent.$table, table => {
|
|
12
|
+
table.comment(entityStudent.$comment.$table);
|
|
13
|
+
table.basicFields();
|
|
14
|
+
table.string(entityStudent.name, 50).comment(entityStudent.$comment.name);
|
|
15
|
+
table.string(entityStudent.description, 255).comment(entityStudent.$comment.description);
|
|
16
|
+
table.string(entityStudent.mobile, 50).comment(entityStudent.$comment.mobile);
|
|
17
|
+
table.integer(entityStudent.level).comment(entityStudent.$comment.level);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDecoratorSsrMenuOptions } from 'vona-module-a-ssr';
|
|
2
|
+
import type { ISsrSiteOptionsAdmin } from 'vona-module-basic-siteadmin';
|
|
3
|
+
|
|
4
|
+
import { BeanBase } from 'vona';
|
|
5
|
+
import { $order } from 'vona-module-a-openapiutils';
|
|
6
|
+
import { SsrMenu } from 'vona-module-a-ssr';
|
|
7
|
+
|
|
8
|
+
import { $locale } from '../.metadata/locales.ts';
|
|
9
|
+
|
|
10
|
+
export interface ISsrMenuOptionsStudent extends IDecoratorSsrMenuOptions<ISsrSiteOptionsAdmin> {}
|
|
11
|
+
|
|
12
|
+
@SsrMenu<ISsrMenuOptionsStudent>({
|
|
13
|
+
items: {
|
|
14
|
+
student: {
|
|
15
|
+
title: $locale('Student'),
|
|
16
|
+
order: $order(1),
|
|
17
|
+
icon: undefined,
|
|
18
|
+
link: 'presetResource',
|
|
19
|
+
meta: {
|
|
20
|
+
params: {
|
|
21
|
+
resource: 'training-student:student',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
group: 'basic-siteadmin:management',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
site: ['basic-siteadmin:admin'],
|
|
28
|
+
})
|
|
29
|
+
export class SsrMenuStudent extends BeanBase {}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
Description: 'Description',
|
|
3
|
+
Level: 'Training Stage',
|
|
4
|
+
LevelAdvanced: 'Advanced Workshop',
|
|
5
|
+
LevelBeginner: 'Foundation Track',
|
|
6
|
+
LevelIntermediate: 'Progress Track',
|
|
7
|
+
Mobile: 'Mobile',
|
|
8
|
+
Name: 'Name',
|
|
9
|
+
Operations: 'Operations',
|
|
10
|
+
Student: 'Student',
|
|
11
|
+
Summary: 'Summary',
|
|
12
|
+
LevelTitle: 'Level Title',
|
|
13
|
+
DescriptionLength: 'Description Length',
|
|
14
|
+
ForceDelete: 'Force Delete',
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
Description: '描述',
|
|
3
|
+
Level: '培训阶段',
|
|
4
|
+
LevelAdvanced: '高级研修班',
|
|
5
|
+
LevelBeginner: '基础班',
|
|
6
|
+
LevelIntermediate: '提升班',
|
|
7
|
+
Mobile: '手机号',
|
|
8
|
+
Name: '名称',
|
|
9
|
+
Operations: '操作',
|
|
10
|
+
Student: '学生',
|
|
11
|
+
Summary: '摘要',
|
|
12
|
+
LevelTitle: '阶段名称',
|
|
13
|
+
DescriptionLength: '描述长度',
|
|
14
|
+
ForceDelete: '强制删除',
|
|
15
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IQueryParams } from 'vona-module-a-orm';
|
|
3
|
+
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
4
|
+
|
|
5
|
+
import { BeanBase } from 'vona';
|
|
6
|
+
import { Core } from 'vona-module-a-core';
|
|
7
|
+
import { Api, Resource, v } from 'vona-module-a-openapiutils';
|
|
8
|
+
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
9
|
+
|
|
10
|
+
import type { ModelStudent } from '../model/student.ts';
|
|
11
|
+
|
|
12
|
+
import { DtoStudentCreate } from '../dto/studentCreate.tsx';
|
|
13
|
+
import { DtoStudentSelectReq } from '../dto/studentSelectReq.tsx';
|
|
14
|
+
import { DtoStudentSelectRes } from '../dto/studentSelectRes.tsx';
|
|
15
|
+
import { DtoStudentSummary } from '../dto/studentSummary.tsx';
|
|
16
|
+
import { DtoStudentUpdate } from '../dto/studentUpdate.tsx';
|
|
17
|
+
import { DtoStudentView } from '../dto/studentView.tsx';
|
|
18
|
+
|
|
19
|
+
export interface IControllerOptionsStudent extends IDecoratorControllerOptions {}
|
|
20
|
+
|
|
21
|
+
@Controller<IControllerOptionsStudent>('student')
|
|
22
|
+
@Resource()
|
|
23
|
+
export class ControllerStudent extends BeanBase {
|
|
24
|
+
@Web.post()
|
|
25
|
+
@Api.body(v.tableIdentity())
|
|
26
|
+
async create(@Arg.body() student: DtoStudentCreate): Promise<TableIdentity> {
|
|
27
|
+
return (await this.scope.service.student.create(student)).id;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Web.get()
|
|
31
|
+
@Api.body(DtoStudentSelectRes)
|
|
32
|
+
@Core.serializer()
|
|
33
|
+
async select(
|
|
34
|
+
@Arg.filter(DtoStudentSelectReq) params: IQueryParams<ModelStudent>,
|
|
35
|
+
): Promise<DtoStudentSelectRes> {
|
|
36
|
+
return await this.scope.service.student.select(params);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@Web.get(':id')
|
|
40
|
+
@Api.body(v.optional(), v.object(DtoStudentView))
|
|
41
|
+
@Core.serializer()
|
|
42
|
+
async view(
|
|
43
|
+
@Arg.param('id', v.tableIdentity()) id: TableIdentity,
|
|
44
|
+
): Promise<DtoStudentView | undefined> {
|
|
45
|
+
return await this.scope.service.student.view(id);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@Web.patch(':id')
|
|
49
|
+
async update(
|
|
50
|
+
@Arg.param('id', v.tableIdentity()) id: TableIdentity,
|
|
51
|
+
@Arg.body() student: DtoStudentUpdate,
|
|
52
|
+
) {
|
|
53
|
+
return await this.scope.service.student.update(id, student);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@Web.get('summary/:id')
|
|
57
|
+
@Api.body(v.optional(), v.object(DtoStudentSummary))
|
|
58
|
+
@Core.serializer()
|
|
59
|
+
async summary(
|
|
60
|
+
@Arg.param('id', v.tableIdentity()) id: TableIdentity,
|
|
61
|
+
): Promise<DtoStudentSummary | undefined> {
|
|
62
|
+
return await this.scope.service.student.summary(id);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Web.delete(':id')
|
|
66
|
+
async delete(@Arg.param('id', v.tableIdentity()) id: TableIdentity) {
|
|
67
|
+
return await this.scope.service.student.delete(id);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Web.delete('deleteForce/:id')
|
|
71
|
+
async deleteForce(@Arg.param('id', v.tableIdentity()) id: TableIdentity) {
|
|
72
|
+
return await this.scope.service.student.deleteForce(id);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
+
|
|
3
|
+
import { $Dto } from 'vona-module-a-orm';
|
|
4
|
+
import { Dto } from 'vona-module-a-web';
|
|
5
|
+
import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
|
|
6
|
+
|
|
7
|
+
import { ModelStudent } from '../model/student.ts';
|
|
8
|
+
|
|
9
|
+
export interface IDtoOptionsStudentCreate extends IDecoratorDtoOptions {}
|
|
10
|
+
|
|
11
|
+
@Dto<IDtoOptionsStudentCreate>({
|
|
12
|
+
blocks: [
|
|
13
|
+
ZovaRender.block('basic-pageentry:blockPageEntry', {
|
|
14
|
+
blocks: [
|
|
15
|
+
ZovaRender.block('basic-pageentry:blockForm'),
|
|
16
|
+
ZovaRender.block('basic-pageentry:blockToolbarRow', {
|
|
17
|
+
actions: [
|
|
18
|
+
ZovaRender.formActionRow('basic-form:actionSubmit', {
|
|
19
|
+
permission: { actionInherit: 'update', formScene: ['create', 'edit'] },
|
|
20
|
+
}),
|
|
21
|
+
ZovaRender.formActionRow('basic-form:actionBack', { permission: { public: true } }),
|
|
22
|
+
],
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
})
|
|
28
|
+
export class DtoStudentCreate extends $Dto.create(() => ModelStudent) {}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
+
|
|
3
|
+
import { $makeSchema, v } from 'vona-module-a-openapiutils';
|
|
4
|
+
import { $Dto } from 'vona-module-a-orm';
|
|
5
|
+
import { Dto } from 'vona-module-a-web';
|
|
6
|
+
import z from 'zod';
|
|
7
|
+
import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
|
|
8
|
+
|
|
9
|
+
import { $locale } from '../.metadata/locales.ts';
|
|
10
|
+
import { EntityStudent, studentLevelItems, studentLevelSchema } from '../entity/student.tsx';
|
|
11
|
+
|
|
12
|
+
export interface IDtoOptionsStudentSelectReq extends IDecoratorDtoOptions {}
|
|
13
|
+
|
|
14
|
+
@Dto<IDtoOptionsStudentSelectReq>({
|
|
15
|
+
openapi: { filter: { table: 'trainingStudent' } },
|
|
16
|
+
fields: {
|
|
17
|
+
name: $makeSchema(v.optional(), z.string()),
|
|
18
|
+
level: $makeSchema(
|
|
19
|
+
v.title($locale('Level')),
|
|
20
|
+
v.optional(),
|
|
21
|
+
ZovaRender.field('basic-select:formFieldSelect', {
|
|
22
|
+
items: studentLevelItems,
|
|
23
|
+
// Keep placeholder undefined so the filter select gets a real empty option
|
|
24
|
+
// instead of a disabled placeholder, allowing users to clear the filter.
|
|
25
|
+
placeholder: undefined,
|
|
26
|
+
}),
|
|
27
|
+
z.preprocess(value => {
|
|
28
|
+
if (typeof value === 'string') return Number.parseInt(value);
|
|
29
|
+
return value;
|
|
30
|
+
}, studentLevelSchema),
|
|
31
|
+
),
|
|
32
|
+
createdAt: $makeSchema(
|
|
33
|
+
ZovaRender.field('basic-date:formFieldDateRange'),
|
|
34
|
+
v.filterTransform('a-web:dateRange'),
|
|
35
|
+
v.optional(),
|
|
36
|
+
z.string(),
|
|
37
|
+
),
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
export class DtoStudentSelectReq extends $Dto.queryPage(EntityStudent, [
|
|
41
|
+
'name',
|
|
42
|
+
'level',
|
|
43
|
+
'createdAt',
|
|
44
|
+
]) {}
|