@octo-cyber/gift-money-mgr 0.5.2
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/.turbo/turbo-build.log +38 -0
- package/dist/controllers/event.controller.d.ts +3 -0
- package/dist/controllers/event.controller.d.ts.map +1 -0
- package/dist/controllers/event.controller.js +39 -0
- package/dist/controllers/event.controller.js.map +1 -0
- package/dist/controllers/gift-record.controller.d.ts +3 -0
- package/dist/controllers/gift-record.controller.d.ts.map +1 -0
- package/dist/controllers/gift-record.controller.js +39 -0
- package/dist/controllers/gift-record.controller.js.map +1 -0
- package/dist/controllers/index.d.ts +6 -0
- package/dist/controllers/index.d.ts.map +1 -0
- package/dist/controllers/index.js +14 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/person.controller.d.ts +3 -0
- package/dist/controllers/person.controller.d.ts.map +1 -0
- package/dist/controllers/person.controller.js +39 -0
- package/dist/controllers/person.controller.js.map +1 -0
- package/dist/controllers/stats.controller.d.ts +3 -0
- package/dist/controllers/stats.controller.d.ts.map +1 -0
- package/dist/controllers/stats.controller.js +17 -0
- package/dist/controllers/stats.controller.js.map +1 -0
- package/dist/controllers/suggestion.controller.d.ts +3 -0
- package/dist/controllers/suggestion.controller.d.ts.map +1 -0
- package/dist/controllers/suggestion.controller.js +18 -0
- package/dist/controllers/suggestion.controller.js.map +1 -0
- package/dist/entities/event.entity.d.ts +19 -0
- package/dist/entities/event.entity.d.ts.map +1 -0
- package/dist/entities/event.entity.js +74 -0
- package/dist/entities/event.entity.js.map +1 -0
- package/dist/entities/gift-record.entity.d.ts +17 -0
- package/dist/entities/gift-record.entity.d.ts.map +1 -0
- package/dist/entities/gift-record.entity.js +68 -0
- package/dist/entities/gift-record.entity.js.map +1 -0
- package/dist/entities/index.d.ts +10 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +22 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/person.entity.d.ts +15 -0
- package/dist/entities/person.entity.d.ts.map +1 -0
- package/dist/entities/person.entity.js +62 -0
- package/dist/entities/person.entity.js.map +1 -0
- package/dist/entities/regional-rate.entity.d.ts +19 -0
- package/dist/entities/regional-rate.entity.d.ts.map +1 -0
- package/dist/entities/regional-rate.entity.js +76 -0
- package/dist/entities/regional-rate.entity.js.map +1 -0
- package/dist/gift-money.module.d.ts +8 -0
- package/dist/gift-money.module.d.ts.map +1 -0
- package/dist/gift-money.module.js +39 -0
- package/dist/gift-money.module.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/event.schema.d.ts +75 -0
- package/dist/schemas/event.schema.d.ts.map +1 -0
- package/dist/schemas/event.schema.js +23 -0
- package/dist/schemas/event.schema.js.map +1 -0
- package/dist/schemas/gift-record.schema.d.ts +72 -0
- package/dist/schemas/gift-record.schema.d.ts.map +1 -0
- package/dist/schemas/gift-record.schema.js +23 -0
- package/dist/schemas/gift-record.schema.js.map +1 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +21 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/person.schema.d.ts +60 -0
- package/dist/schemas/person.schema.d.ts.map +1 -0
- package/dist/schemas/person.schema.js +20 -0
- package/dist/schemas/person.schema.js.map +1 -0
- package/dist/schemas/regional-rate.schema.d.ts +42 -0
- package/dist/schemas/regional-rate.schema.d.ts.map +1 -0
- package/dist/schemas/regional-rate.schema.js +20 -0
- package/dist/schemas/regional-rate.schema.js.map +1 -0
- package/dist/services/event.service.d.ts +17 -0
- package/dist/services/event.service.d.ts.map +1 -0
- package/dist/services/event.service.js +84 -0
- package/dist/services/event.service.js.map +1 -0
- package/dist/services/gift-record.service.d.ts +19 -0
- package/dist/services/gift-record.service.d.ts.map +1 -0
- package/dist/services/gift-record.service.js +93 -0
- package/dist/services/gift-record.service.js.map +1 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +14 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/person.service.d.ts +17 -0
- package/dist/services/person.service.d.ts.map +1 -0
- package/dist/services/person.service.js +77 -0
- package/dist/services/person.service.js.map +1 -0
- package/dist/services/stats.service.d.ts +29 -0
- package/dist/services/stats.service.d.ts.map +1 -0
- package/dist/services/stats.service.js +112 -0
- package/dist/services/stats.service.js.map +1 -0
- package/dist/services/suggestion.service.d.ts +22 -0
- package/dist/services/suggestion.service.d.ts.map +1 -0
- package/dist/services/suggestion.service.js +99 -0
- package/dist/services/suggestion.service.js.map +1 -0
- package/package.json +61 -0
- package/src/controllers/event.controller.ts +58 -0
- package/src/controllers/gift-record.controller.ts +58 -0
- package/src/controllers/index.ts +5 -0
- package/src/controllers/person.controller.ts +58 -0
- package/src/controllers/stats.controller.ts +23 -0
- package/src/controllers/suggestion.controller.ts +19 -0
- package/src/entities/event.entity.ts +47 -0
- package/src/entities/gift-record.entity.ts +43 -0
- package/src/entities/index.ts +16 -0
- package/src/entities/person.entity.ts +39 -0
- package/src/entities/regional-rate.entity.ts +46 -0
- package/src/gift-money.module.ts +41 -0
- package/src/index.ts +46 -0
- package/src/schemas/event.schema.ts +28 -0
- package/src/schemas/gift-record.schema.ts +28 -0
- package/src/schemas/index.ts +4 -0
- package/src/schemas/person.schema.ts +25 -0
- package/src/schemas/regional-rate.schema.ts +22 -0
- package/src/services/event.service.ts +81 -0
- package/src/services/gift-record.service.ts +95 -0
- package/src/services/index.ts +7 -0
- package/src/services/person.service.ts +74 -0
- package/src/services/stats.service.ts +132 -0
- package/src/services/suggestion.service.ts +108 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +14 -0
- package/vitest.config.ts +8 -0
- package/web/index.ts +23 -0
- package/web/manifest.ts +32 -0
- package/web/messages/en-US.json +121 -0
- package/web/messages/zh-CN.json +121 -0
- package/web/pages/EventsPage.tsx +278 -0
- package/web/pages/RecordsPage.tsx +328 -0
- package/web/pages/StatsPage.tsx +189 -0
- package/web/pages/SuggestionPage.tsx +175 -0
- package/web/services/gift-money-service.ts +111 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
> @octo-cyber/gift-money-mgr@0.5.0 build /Users/zangjiafu/Work/project/Octo/packages/gift-money-mgr
|
|
3
|
+
> tsc -p tsconfig.build.json
|
|
4
|
+
|
|
5
|
+
src/controllers/event.controller.ts(1,49): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
6
|
+
src/controllers/event.controller.ts(2,64): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
7
|
+
src/controllers/gift-record.controller.ts(1,49): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
8
|
+
src/controllers/gift-record.controller.ts(2,64): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
9
|
+
src/controllers/person.controller.ts(1,49): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
10
|
+
src/controllers/person.controller.ts(2,64): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
11
|
+
src/controllers/stats.controller.ts(1,49): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
12
|
+
src/controllers/stats.controller.ts(2,54): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
13
|
+
src/controllers/suggestion.controller.ts(1,49): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
14
|
+
src/controllers/suggestion.controller.ts(2,64): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
15
|
+
src/entities/event.entity.ts(7,8): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
16
|
+
src/entities/gift-record.entity.ts(7,8): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
17
|
+
src/entities/person.entity.ts(7,8): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
18
|
+
src/entities/regional-rate.entity.ts(7,8): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
19
|
+
src/gift-money.module.ts(1,42): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
20
|
+
src/gift-money.module.ts(2,55): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
21
|
+
src/schemas/event.schema.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
|
|
22
|
+
src/schemas/gift-record.schema.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
|
|
23
|
+
src/schemas/person.schema.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
|
|
24
|
+
src/schemas/regional-rate.schema.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
|
|
25
|
+
src/services/event.service.ts(1,63): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
26
|
+
src/services/event.service.ts(2,33): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
27
|
+
src/services/gift-record.service.ts(1,63): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
28
|
+
src/services/gift-record.service.ts(2,33): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
29
|
+
src/services/person.service.ts(1,63): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
30
|
+
src/services/person.service.ts(2,33): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
31
|
+
src/services/stats.service.ts(1,53): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
32
|
+
src/services/stats.service.ts(2,33): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
33
|
+
src/services/suggestion.service.ts(1,53): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
34
|
+
src/services/suggestion.service.ts(2,33): error TS2307: Cannot find module '@octo-cyber/core' or its corresponding type declarations.
|
|
35
|
+
src/services/suggestion.service.ts(72,39): error TS7006: Parameter 'r' implicitly has an 'any' type.
|
|
36
|
+
src/services/suggestion.service.ts(101,50): error TS7006: Parameter 'r' implicitly has an 'any' type.
|
|
37
|
+
ELIFECYCLE Command failed with exit code 2.
|
|
38
|
+
WARN Local package.json exists, but node_modules missing, did you mean to install?
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/event.controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AASnE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAgDtD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerEventRoutes = registerEventRoutes;
|
|
4
|
+
const core_1 = require("@octo-cyber/core");
|
|
5
|
+
const event_service_js_1 = require("../services/event.service.js");
|
|
6
|
+
const event_schema_js_1 = require("../schemas/event.schema.js");
|
|
7
|
+
function registerEventRoutes(app) {
|
|
8
|
+
const svc = core_1.Container.get(event_service_js_1.EventService);
|
|
9
|
+
app.post('/api/v1/gift-money/events', (0, core_1.asyncHandler)(async (req, res) => {
|
|
10
|
+
const parsed = event_schema_js_1.CreateEventSchema.safeParse(req.body);
|
|
11
|
+
if (!parsed.success)
|
|
12
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
13
|
+
const event = await svc.createEvent(parsed.data);
|
|
14
|
+
res.status(201).json(core_1.ApiResponse.ok(event, 'Event created'));
|
|
15
|
+
}));
|
|
16
|
+
app.get('/api/v1/gift-money/events', (0, core_1.asyncHandler)(async (req, res) => {
|
|
17
|
+
const parsed = event_schema_js_1.EventQuerySchema.safeParse(req.query);
|
|
18
|
+
if (!parsed.success)
|
|
19
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid query');
|
|
20
|
+
const result = await svc.listEvents(parsed.data);
|
|
21
|
+
res.json(core_1.ApiResponse.paginated(result.items, result.total, parsed.data.page, parsed.data.pageSize));
|
|
22
|
+
}));
|
|
23
|
+
app.get('/api/v1/gift-money/events/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
24
|
+
const event = await svc.getEventById(req.params.id);
|
|
25
|
+
res.json(core_1.ApiResponse.ok(event));
|
|
26
|
+
}));
|
|
27
|
+
app.patch('/api/v1/gift-money/events/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
28
|
+
const parsed = event_schema_js_1.UpdateEventSchema.safeParse(req.body);
|
|
29
|
+
if (!parsed.success)
|
|
30
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
31
|
+
const event = await svc.updateEvent(req.params.id, parsed.data);
|
|
32
|
+
res.json(core_1.ApiResponse.ok(event));
|
|
33
|
+
}));
|
|
34
|
+
app.delete('/api/v1/gift-money/events/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
35
|
+
await svc.deleteEvent(req.params.id);
|
|
36
|
+
res.json(core_1.ApiResponse.ok(null, 'Event deleted'));
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=event.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.controller.js","sourceRoot":"","sources":["../../src/controllers/event.controller.ts"],"names":[],"mappings":";;AASA,kDAgDC;AAxDD,2CAAkF;AAClF,mEAA4D;AAC5D,gEAIoC;AAEpC,SAAgB,mBAAmB,CAAC,GAAY;IAC9C,MAAM,GAAG,GAAG,gBAAS,CAAC,GAAG,CAAC,+BAAY,CAAC,CAAC;IAExC,GAAG,CAAC,IAAI,CACN,2BAA2B,EAC3B,IAAA,mBAAY,EAAC,KAAK,EAAE,GAA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appings":"AAAA,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AASnE,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAgD3D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerGiftRecordRoutes = registerGiftRecordRoutes;
|
|
4
|
+
const core_1 = require("@octo-cyber/core");
|
|
5
|
+
const gift_record_service_js_1 = require("../services/gift-record.service.js");
|
|
6
|
+
const gift_record_schema_js_1 = require("../schemas/gift-record.schema.js");
|
|
7
|
+
function registerGiftRecordRoutes(app) {
|
|
8
|
+
const svc = core_1.Container.get(gift_record_service_js_1.GiftRecordService);
|
|
9
|
+
app.post('/api/v1/gift-money/records', (0, core_1.asyncHandler)(async (req, res) => {
|
|
10
|
+
const parsed = gift_record_schema_js_1.CreateGiftRecordSchema.safeParse(req.body);
|
|
11
|
+
if (!parsed.success)
|
|
12
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
13
|
+
const record = await svc.createRecord(parsed.data);
|
|
14
|
+
res.status(201).json(core_1.ApiResponse.ok(record, 'Gift record created'));
|
|
15
|
+
}));
|
|
16
|
+
app.get('/api/v1/gift-money/records', (0, core_1.asyncHandler)(async (req, res) => {
|
|
17
|
+
const parsed = gift_record_schema_js_1.GiftRecordQuerySchema.safeParse(req.query);
|
|
18
|
+
if (!parsed.success)
|
|
19
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid query');
|
|
20
|
+
const result = await svc.listRecords(parsed.data);
|
|
21
|
+
res.json(core_1.ApiResponse.paginated(result.items, result.total, parsed.data.page, parsed.data.pageSize));
|
|
22
|
+
}));
|
|
23
|
+
app.get('/api/v1/gift-money/records/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
24
|
+
const record = await svc.getRecordById(req.params.id);
|
|
25
|
+
res.json(core_1.ApiResponse.ok(record));
|
|
26
|
+
}));
|
|
27
|
+
app.patch('/api/v1/gift-money/records/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
28
|
+
const parsed = gift_record_schema_js_1.UpdateGiftRecordSchema.safeParse(req.body);
|
|
29
|
+
if (!parsed.success)
|
|
30
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
31
|
+
const record = await svc.updateRecord(req.params.id, parsed.data);
|
|
32
|
+
res.json(core_1.ApiResponse.ok(record));
|
|
33
|
+
}));
|
|
34
|
+
app.delete('/api/v1/gift-money/records/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
35
|
+
await svc.deleteRecord(req.params.id);
|
|
36
|
+
res.json(core_1.ApiResponse.ok(null, 'Gift record deleted'));
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=gift-record.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gift-record.controller.js","sourceRoot":"","sources":["../../src/controllers/gift-record.controller.ts"],"names":[],"mappings":";;AASA,4DAgDC;AAxDD,2CAAkF;AAClF,+EAAuE;AACvE,4EAI0C;AAE1C,SAAgB,wBAAwB,CAAC,GAAY;IACnD,MAAM,GAAG,GAAG,gBAAS,CAAC,GAAG,CAAC,0CAAiB,CAAC,CAAC;IAE7C,GAAG,CAAC,IAAI,CACN,4BAA4B,EAC5B,IAAA,mBAAY,EAAC,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;QACjD,MAAM,MAAM,GAAG,8CAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,MAAM,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,eAAe,CAAC,CAAC;QACnG,MAAM,MAAM,GAAG,MAAM,GAAG,C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AAY,EAAE,GAAa,EAAE,EAAE;QACjD,MAAM,MAAM,GAAG,8CAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,MAAM,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,eAAe,CAAC,CAAC;QACnG,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAY,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5E,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CACH,CAAC;IAEF,GAAG,CAAC,MAAM,CACR,gCAAgC,EAChC,IAAA,mBAAY,EAAC,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;QACjD,MAAM,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAY,CAAC,CAAC;QAChD,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { registerPersonRoutes } from './person.controller.js';
|
|
2
|
+
export { registerEventRoutes } from './event.controller.js';
|
|
3
|
+
export { registerGiftRecordRoutes } from './gift-record.controller.js';
|
|
4
|
+
export { registerSuggestionRoutes } from './suggestion.controller.js';
|
|
5
|
+
export { registerStatsRoutes } from './stats.controller.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerStatsRoutes = exports.registerSuggestionRoutes = exports.registerGiftRecordRoutes = exports.registerEventRoutes = exports.registerPersonRoutes = void 0;
|
|
4
|
+
var person_controller_js_1 = require("./person.controller.js");
|
|
5
|
+
Object.defineProperty(exports, "registerPersonRoutes", { enumerable: true, get: function () { return person_controller_js_1.registerPersonRoutes; } });
|
|
6
|
+
var event_controller_js_1 = require("./event.controller.js");
|
|
7
|
+
Object.defineProperty(exports, "registerEventRoutes", { enumerable: true, get: function () { return event_controller_js_1.registerEventRoutes; } });
|
|
8
|
+
var gift_record_controller_js_1 = require("./gift-record.controller.js");
|
|
9
|
+
Object.defineProperty(exports, "registerGiftRecordRoutes", { enumerable: true, get: function () { return gift_record_controller_js_1.registerGiftRecordRoutes; } });
|
|
10
|
+
var suggestion_controller_js_1 = require("./suggestion.controller.js");
|
|
11
|
+
Object.defineProperty(exports, "registerSuggestionRoutes", { enumerable: true, get: function () { return suggestion_controller_js_1.registerSuggestionRoutes; } });
|
|
12
|
+
var stats_controller_js_1 = require("./stats.controller.js");
|
|
13
|
+
Object.defineProperty(exports, "registerStatsRoutes", { enumerable: true, get: function () { return stats_controller_js_1.registerStatsRoutes; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,yEAAuE;AAA9D,qIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/person.controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AASnE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAgDvD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerPersonRoutes = registerPersonRoutes;
|
|
4
|
+
const core_1 = require("@octo-cyber/core");
|
|
5
|
+
const person_service_js_1 = require("../services/person.service.js");
|
|
6
|
+
const person_schema_js_1 = require("../schemas/person.schema.js");
|
|
7
|
+
function registerPersonRoutes(app) {
|
|
8
|
+
const svc = core_1.Container.get(person_service_js_1.PersonService);
|
|
9
|
+
app.post('/api/v1/gift-money/persons', (0, core_1.asyncHandler)(async (req, res) => {
|
|
10
|
+
const parsed = person_schema_js_1.CreatePersonSchema.safeParse(req.body);
|
|
11
|
+
if (!parsed.success)
|
|
12
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
13
|
+
const person = await svc.createPerson(parsed.data);
|
|
14
|
+
res.status(201).json(core_1.ApiResponse.ok(person, 'Person created'));
|
|
15
|
+
}));
|
|
16
|
+
app.get('/api/v1/gift-money/persons', (0, core_1.asyncHandler)(async (req, res) => {
|
|
17
|
+
const parsed = person_schema_js_1.PersonQuerySchema.safeParse(req.query);
|
|
18
|
+
if (!parsed.success)
|
|
19
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid query');
|
|
20
|
+
const result = await svc.listPersons(parsed.data);
|
|
21
|
+
res.json(core_1.ApiResponse.paginated(result.items, result.total, parsed.data.page, parsed.data.pageSize));
|
|
22
|
+
}));
|
|
23
|
+
app.get('/api/v1/gift-money/persons/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
24
|
+
const person = await svc.getPersonById(req.params.id);
|
|
25
|
+
res.json(core_1.ApiResponse.ok(person));
|
|
26
|
+
}));
|
|
27
|
+
app.patch('/api/v1/gift-money/persons/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
28
|
+
const parsed = person_schema_js_1.UpdatePersonSchema.safeParse(req.body);
|
|
29
|
+
if (!parsed.success)
|
|
30
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid input');
|
|
31
|
+
const person = await svc.updatePerson(req.params.id, parsed.data);
|
|
32
|
+
res.json(core_1.ApiResponse.ok(person));
|
|
33
|
+
}));
|
|
34
|
+
app.delete('/api/v1/gift-money/persons/:id', (0, core_1.asyncHandler)(async (req, res) => {
|
|
35
|
+
await svc.deletePerson(req.params.id);
|
|
36
|
+
res.json(core_1.ApiResponse.ok(null, 'Person deleted'));
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=person.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person.controller.js","sourceRoot":"","sources":["../../src/controllers/person.controller.ts"],"names":[],"mappings":";;AASA,oDAgDC;AAxDD,2CAAkF;AAClF,qEAA8D;AAC9D,kEAIqC;AAErC,SAAgB,oBAAoB,CAAC,GAAY;IAC/C,MAAM,GAAG,GAAG,gBAAS,CAAC,GAAG,CAAC,iCAAa,CAAC,CAAC;IAEzC,GAAG,CAAC,IAAI,CACN,4BAA4B,EAC5B,IAAA,mBAAY,EAAC,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;QACjD,MAAM,MAAM,GAAG,qCAAkB,CAAC,SAAS,CAAC,GAAG,CA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AAG,EAAE,OAAO,GAAG,IAAI,CAkBtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerStatsRoutes = registerStatsRoutes;
|
|
4
|
+
const core_1 = require("@octo-cyber/core");
|
|
5
|
+
const stats_service_js_1 = require("../services/stats.service.js");
|
|
6
|
+
function registerStatsRoutes(app) {
|
|
7
|
+
const svc = core_1.Container.get(stats_service_js_1.StatsService);
|
|
8
|
+
app.get('/api/v1/gift-money/stats', (0, core_1.asyncHandler)(async (_req, res) => {
|
|
9
|
+
const stats = await svc.getOverallStats();
|
|
10
|
+
res.json(core_1.ApiResponse.ok(stats));
|
|
11
|
+
}));
|
|
12
|
+
app.get('/api/v1/gift-money/stats/relationship', (0, core_1.asyncHandler)(async (_req, res) => {
|
|
13
|
+
const stats = await svc.getRelationshipStats();
|
|
14
|
+
res.json(core_1.ApiResponse.ok(stats));
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=stats.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.controller.js","sourceRoot":"","sources":["../../src/controllers/stats.controller.ts"],"names":[],"mappings":";;AAIA,kDAkBC;AArBD,2CAAwE;AACxE,mEAA4D;AAE5D,SAAgB,mBAAmB,CAAC,GAAY;IAC9C,MAAM,GAAG,GAAG,gBAAS,CAAC,GAAG,CAAC,+BAAY,CAAC,CAAC;IAExC,GAAG,CAAC,GAAG,CACL,0BAA0B,EAC1B,IAAA,mBAAY,EAAC,KAAK,EAAE,IAAa,EAAE,GAAa,EAAE,EAAE;QAClD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,eAAe,EAAE,CAAC;QAC1C,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,CACH,CAAC;IAEF,GAAG,CAAC,GAAG,CACL,uCAAuC,EACvC,IAAA,mBAAY,EAAC,KAAK,EAAE,IAAa,EAAE,GAAa,EAAE,EAAE;QAClD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,oBAAoB,EAAE,CAAC;QAC/C,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/suggestion.controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKnE,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAa3D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerSuggestionRoutes = registerSuggestionRoutes;
|
|
4
|
+
const core_1 = require("@octo-cyber/core");
|
|
5
|
+
const suggestion_service_js_1 = require("../services/suggestion.service.js");
|
|
6
|
+
const regional_rate_schema_js_1 = require("../schemas/regional-rate.schema.js");
|
|
7
|
+
function registerSuggestionRoutes(app) {
|
|
8
|
+
const svc = core_1.Container.get(suggestion_service_js_1.SuggestionService);
|
|
9
|
+
// GET /api/v1/gift-money/suggestion?personId=&eventType=®ion=
|
|
10
|
+
app.get('/api/v1/gift-money/suggestion', (0, core_1.asyncHandler)(async (req, res) => {
|
|
11
|
+
const parsed = regional_rate_schema_js_1.SuggestionQuerySchema.safeParse(req.query);
|
|
12
|
+
if (!parsed.success)
|
|
13
|
+
throw core_1.AppError.badRequest(parsed.error.issues[0]?.message ?? 'Invalid query');
|
|
14
|
+
const result = await svc.getSuggestion(parsed.data);
|
|
15
|
+
res.json(core_1.ApiResponse.ok(result));
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=suggestion.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.controller.js","sourceRoot":"","sources":["../../src/controllers/suggestion.controller.ts"],"names":[],"mappings":";;AAKA,4DAaC;AAjBD,2CAAkF;AAClF,6EAAsE;AACtE,gFAA2E;AAE3E,SAAgB,wBAAwB,CAAC,GAAY;IACnD,MAAM,GAAG,GAAG,gBAAS,CAAC,GAAG,CAAC,yCAAiB,CAAC,CAAC;IAE7C,iEAAiE;IACjE,GAAG,CAAC,GAAG,CACL,+BAA+B,EAC/B,IAAA,mBAAY,EAAC,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;QACjD,MAAM,MAAM,GAAG,+CAAqB,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,MAAM,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,eAAe,CAAC,CAAC;QACnG,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpD,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** 婚礼/葬礼/生日/满月/升学/乔迁/其他 */
|
|
2
|
+
export type EventType = 'wedding' | 'funeral' | 'birthday' | 'baby' | 'graduation' | 'housewarming' | 'other';
|
|
3
|
+
export declare class GiftEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** 事件类型 */
|
|
7
|
+
type: string;
|
|
8
|
+
/** 事件日期 */
|
|
9
|
+
eventDate: string;
|
|
10
|
+
/** 主办方(关联人员表,他人婚宴等场合的主人) */
|
|
11
|
+
hostPersonId: string | null;
|
|
12
|
+
/** true = 我方是主办方(我们收份子钱) */
|
|
13
|
+
isOwnEvent: boolean;
|
|
14
|
+
location: string | null;
|
|
15
|
+
notes: string | null;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=event.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/event.entity.ts"],"names":[],"mappings":"AAQA,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,cAAc,GAAG,OAAO,CAAC;AAE9G,qBACa,SAAS;IAEpB,EAAE,EAAG,MAAM,CAAC;IAGZ,KAAK,EAAG,MAAM,CAAC;IAEf,WAAW;IAEX,IAAI,EAAG,MAAM,CAAC;IAEd,WAAW;IAEX,SAAS,EAAG,MAAM,CAAC;IAEnB,4BAA4B;IAE5B,YAAY,EAAG,MAAM,GAAG,IAAI,CAAC;IAE7B,4BAA4B;IAE5B,UAAU,EAAG,OAAO,CAAC;IAGrB,QAAQ,EAAG,MAAM,GAAG,IAAI,CAAC;IAGzB,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GiftEvent = void 0;
|
|
13
|
+
const core_1 = require("@octo-cyber/core");
|
|
14
|
+
let GiftEvent = class GiftEvent {
|
|
15
|
+
id;
|
|
16
|
+
title;
|
|
17
|
+
/** 事件类型 */
|
|
18
|
+
type;
|
|
19
|
+
/** 事件日期 */
|
|
20
|
+
eventDate;
|
|
21
|
+
/** 主办方(关联人员表,他人婚宴等场合的主人) */
|
|
22
|
+
hostPersonId;
|
|
23
|
+
/** true = 我方是主办方(我们收份子钱) */
|
|
24
|
+
isOwnEvent;
|
|
25
|
+
location;
|
|
26
|
+
notes;
|
|
27
|
+
createdAt;
|
|
28
|
+
updatedAt;
|
|
29
|
+
};
|
|
30
|
+
exports.GiftEvent = GiftEvent;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, core_1.PrimaryGeneratedColumn)('uuid'),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], GiftEvent.prototype, "id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, core_1.Column)({ type: 'varchar', length: 256 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], GiftEvent.prototype, "title", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, core_1.Column)({ type: 'varchar', length: 32, default: 'other' }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], GiftEvent.prototype, "type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, core_1.Column)({ type: 'varchar', length: 10, name: 'event_date' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], GiftEvent.prototype, "eventDate", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'host_person_id' }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], GiftEvent.prototype, "hostPersonId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, core_1.Column)({ type: 'boolean', default: false, name: 'is_own_event' }),
|
|
53
|
+
__metadata("design:type", Boolean)
|
|
54
|
+
], GiftEvent.prototype, "isOwnEvent", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, core_1.Column)({ type: 'varchar', length: 256, nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], GiftEvent.prototype, "location", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], GiftEvent.prototype, "notes", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], GiftEvent.prototype, "createdAt", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, core_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
69
|
+
__metadata("design:type", Date)
|
|
70
|
+
], GiftEvent.prototype, "updatedAt", void 0);
|
|
71
|
+
exports.GiftEvent = GiftEvent = __decorate([
|
|
72
|
+
(0, core_1.Entity)('gm_event')
|
|
73
|
+
], GiftEvent);
|
|
74
|
+
//# sourceMappingURL=event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../src/entities/event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAM0B;AAMnB,IAAM,SAAS,GAAf,MAAM,SAAS;IAEpB,EAAE,CAAU;IAGZ,KAAK,CAAU;IAEf,WAAW;IAEX,IAAI,CAAU;IAEd,WAAW;IAEX,S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AAE,CAAC;8BAC7B,IAAI;4CAAC;oBAjCN,SAAS;IADrB,IAAA,aAAM,EAAC,UAAU,CAAC;GACN,SAAS,CAkCrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** given = 我们送出 / received = 我们收到 */
|
|
2
|
+
export type GiftDirection = 'given' | 'received';
|
|
3
|
+
export declare class GiftRecord {
|
|
4
|
+
id: string;
|
|
5
|
+
eventId: string;
|
|
6
|
+
personId: string;
|
|
7
|
+
/** 金额(元),保留两位小数 */
|
|
8
|
+
amount: number;
|
|
9
|
+
/** given = 我们送出 / received = 我们收到 */
|
|
10
|
+
direction: string;
|
|
11
|
+
/** 送礼/收礼日期 */
|
|
12
|
+
giftDate: string;
|
|
13
|
+
notes: string | null;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=gift-record.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gift-record.entity.d.ts","sourceRoot":"","sources":["../../src/entities/gift-record.entity.ts"],"names":[],"mappings":"AAQA,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AAEjD,qBACa,UAAU;IAErB,EAAE,EAAG,MAAM,CAAC;IAGZ,OAAO,EAAG,MAAM,CAAC;IAGjB,QAAQ,EAAG,MAAM,CAAC;IAElB,mBAAmB;IAEnB,MAAM,EAAG,MAAM,CAAC;IAEhB,qCAAqC;IAErC,SAAS,EAAG,MAAM,CAAC;IAEnB,cAAc;IAEd,QAAQ,EAAG,MAAM,CAAC;IAGlB,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GiftRecord = void 0;
|
|
13
|
+
const core_1 = require("@octo-cyber/core");
|
|
14
|
+
let GiftRecord = class GiftRecord {
|
|
15
|
+
id;
|
|
16
|
+
eventId;
|
|
17
|
+
personId;
|
|
18
|
+
/** 金额(元),保留两位小数 */
|
|
19
|
+
amount;
|
|
20
|
+
/** given = 我们送出 / received = 我们收到 */
|
|
21
|
+
direction;
|
|
22
|
+
/** 送礼/收礼日期 */
|
|
23
|
+
giftDate;
|
|
24
|
+
notes;
|
|
25
|
+
createdAt;
|
|
26
|
+
updatedAt;
|
|
27
|
+
};
|
|
28
|
+
exports.GiftRecord = GiftRecord;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, core_1.PrimaryGeneratedColumn)('uuid'),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GiftRecord.prototype, "id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, core_1.Column)({ type: 'varchar', length: 36, name: 'event_id' }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], GiftRecord.prototype, "eventId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, core_1.Column)({ type: 'varchar', length: 36, name: 'person_id' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], GiftRecord.prototype, "personId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, core_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], GiftRecord.prototype, "amount", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, core_1.Column)({ type: 'varchar', length: 8, default: 'given' }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], GiftRecord.prototype, "direction", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, core_1.Column)({ type: 'varchar', length: 10, name: 'gift_date' }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], GiftRecord.prototype, "giftDate", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], GiftRecord.prototype, "notes", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], GiftRecord.prototype, "createdAt", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, core_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], GiftRecord.prototype, "updatedAt", void 0);
|
|
65
|
+
exports.GiftRecord = GiftRecord = __decorate([
|
|
66
|
+
(0, core_1.Entity)('gm_gift_record')
|
|
67
|
+
], GiftRecord);
|
|
68
|
+
//# sourceMappingURL=gift-record.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gift-record.entity.js","sourceRoot":"","sources":["../../src/entities/gift-record.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAM0B;AAMnB,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,EAAE,CAAU;IAGZ,OAAO,CAAU;IAGjB,QAAQ,CA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@@
|
|
|
1
|
+
import { Person } from './person.entity.js';
|
|
2
|
+
import { GiftEvent } from './event.entity.js';
|
|
3
|
+
import { GiftRecord } from './gift-record.entity.js';
|
|
4
|
+
import { RegionalRate } from './regional-rate.entity.js';
|
|
5
|
+
export { Person } from './person.entity.js';
|
|
6
|
+
export { GiftEvent } from './event.entity.js';
|
|
7
|
+
export { GiftRecord } from './gift-record.entity.js';
|
|
8
|
+
export { RegionalRate } from './regional-rate.entity.js';
|
|
9
|
+
export declare const GIFT_MONEY_ENTITIES: readonly [typeof Person, typeof GiftEvent, typeof GiftRecord, typeof RegionalRate];
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,eAAO,MAAM,mBAAmB,oFAKtB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GIFT_MONEY_ENTITIES = exports.RegionalRate = exports.GiftRecord = exports.GiftEvent = exports.Person = void 0;
|
|
4
|
+
const person_entity_js_1 = require("./person.entity.js");
|
|
5
|
+
const event_entity_js_1 = require("./event.entity.js");
|
|
6
|
+
const gift_record_entity_js_1 = require("./gift-record.entity.js");
|
|
7
|
+
const regional_rate_entity_js_1 = require("./regional-rate.entity.js");
|
|
8
|
+
var person_entity_js_2 = require("./person.entity.js");
|
|
9
|
+
Object.defineProperty(exports, "Person", { enumerable: true, get: function () { return person_entity_js_2.Person; } });
|
|
10
|
+
var event_entity_js_2 = require("./event.entity.js");
|
|
11
|
+
Object.defineProperty(exports, "GiftEvent", { enumerable: true, get: function () { return event_entity_js_2.GiftEvent; } });
|
|
12
|
+
var gift_record_entity_js_2 = require("./gift-record.entity.js");
|
|
13
|
+
Object.defineProperty(exports, "GiftRecord", { enumerable: true, get: function () { return gift_record_entity_js_2.GiftRecord; } });
|
|
14
|
+
var regional_rate_entity_js_2 = require("./regional-rate.entity.js");
|
|
15
|
+
Object.defineProperty(exports, "RegionalRate", { enumerable: true, get: function () { return regional_rate_entity_js_2.RegionalRate; } });
|
|
16
|
+
exports.GIFT_MONEY_ENTITIES = [
|
|
17
|
+
person_entity_js_1.Person,
|
|
18
|
+
event_entity_js_1.GiftEvent,
|
|
19
|
+
gift_record_entity_js_1.GiftRecord,
|
|
20
|
+
regional_rate_entity_js_1.RegionalRate,
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;AAAA,yDAA4C;AAC5C,uDAA8C;AAC9C,mEAAqD;AACrD,uEAAyD;AAEzD,uDAA4C;AAAnC,0GAAA,MAAM,OAAA;AACf,qDAA8C;AAArC,4GAAA,SAAS,OAAA;AAClB,iEAAqD;AAA5C,mHAAA,UAAU,OAAA;AACnB,qEAAyD;AAAhD,uHAAA,YAAY,OAAA;AAER,QAAA,mBAAmB,GAAG;IACjC,yBAAM;IACN,2BAAS;IACT,kCAAU;IACV,sCAAY;CACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 亲属/朋友/同事/邻居/其他 */
|
|
2
|
+
export type RelationshipType = 'relative' | 'friend' | 'colleague' | 'neighbor' | 'other';
|
|
3
|
+
export declare class Person {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
/** 关系大类:亲属/朋友/同事/邻居/其他 */
|
|
7
|
+
relationship: string;
|
|
8
|
+
/** 具体关系描述,如"舅舅"、"大学同学" */
|
|
9
|
+
relationshipDetail: string | null;
|
|
10
|
+
phone: string | null;
|
|
11
|
+
notes: string | null;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=person.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person.entity.d.ts","sourceRoot":"","sources":["../../src/entities/person.entity.ts"],"names":[],"mappings":"AAQA,qBAAqB;AACrB,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AAE1F,qBACa,MAAM;IAEjB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAEd,0BAA0B;IAE1B,YAAY,EAAG,MAAM,CAAC;IAEtB,0BAA0B;IAE1B,kBAAkB,EAAG,MAAM,GAAG,IAAI,CAAC;IAGnC,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|