feat: 支持一键发布服务端

This commit is contained in:
richarjiang
2026-04-04 15:39:26 +08:00
parent 2b3b636c54
commit 982e569fa3
45 changed files with 852 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WEEKDAY_LABELS = exports.DATE_SELECTOR_DAYS = exports.TIME_PERIODS = exports.SLOT_GENERATION_DAYS = exports.DEFAULT_SLOT_CAPACITY = exports.DEFAULT_CANCEL_HOURS_LIMIT = void 0;
/** 默认免费取消截止小时数 */
exports.DEFAULT_CANCEL_HOURS_LIMIT = 2;
/** 默认时段容量(私教 = 1 */
exports.DEFAULT_SLOT_CAPACITY = 1;
/** 自动生成时段的天数范围 */
exports.SLOT_GENERATION_DAYS = 14;
/** 时段筛选区间 */
exports.TIME_PERIODS = {
MORNING: { label: '上午', start: '06:00', end: '12:00' },
AFTERNOON: { label: '下午', start: '12:00', end: '18:00' },
EVENING: { label: '晚上', start: '18:00', end: '22:00' },
};
/** 日期选择器展示天数 */
exports.DATE_SELECTOR_DAYS = 7;
/** 星期映射 */
exports.WEEKDAY_LABELS = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日'];
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AACL,QAAA,0BAA0B,GAAG,CAAC,CAAA;AAE3C,qBAAqB;AACR,QAAA,qBAAqB,GAAG,CAAC,CAAA;AAEtC,kBAAkB;AACL,QAAA,oBAAoB,GAAG,EAAE,CAAA;AAEtC,aAAa;AACA,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;IACtD,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;IACxD,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;CAC9C,CAAA;AAEV,gBAAgB;AACH,QAAA,kBAAkB,GAAG,CAAC,CAAA;AAEnC,WAAW;AACE,QAAA,cAAc,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA"}

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderStatus = exports.BookingStatus = exports.TimeSlotSource = exports.TimeSlotStatus = exports.MembershipStatus = exports.CardTypeCategory = exports.UserRole = void 0;
// ===== User =====
var UserRole;
(function (UserRole) {
UserRole["MEMBER"] = "MEMBER";
UserRole["ADMIN"] = "ADMIN";
})(UserRole || (exports.UserRole = UserRole = {}));
// ===== CardType =====
var CardTypeCategory;
(function (CardTypeCategory) {
CardTypeCategory["TIMES"] = "TIMES";
CardTypeCategory["DURATION"] = "DURATION";
CardTypeCategory["TRIAL"] = "TRIAL";
})(CardTypeCategory || (exports.CardTypeCategory = CardTypeCategory = {}));
// ===== Membership =====
var MembershipStatus;
(function (MembershipStatus) {
MembershipStatus["ACTIVE"] = "ACTIVE";
MembershipStatus["EXPIRED"] = "EXPIRED";
MembershipStatus["USED_UP"] = "USED_UP";
})(MembershipStatus || (exports.MembershipStatus = MembershipStatus = {}));
// ===== TimeSlot =====
var TimeSlotStatus;
(function (TimeSlotStatus) {
TimeSlotStatus["OPEN"] = "OPEN";
TimeSlotStatus["FULL"] = "FULL";
TimeSlotStatus["CLOSED"] = "CLOSED";
})(TimeSlotStatus || (exports.TimeSlotStatus = TimeSlotStatus = {}));
var TimeSlotSource;
(function (TimeSlotSource) {
TimeSlotSource["TEMPLATE"] = "TEMPLATE";
TimeSlotSource["MANUAL"] = "MANUAL";
})(TimeSlotSource || (exports.TimeSlotSource = TimeSlotSource = {}));
// ===== Booking =====
var BookingStatus;
(function (BookingStatus) {
BookingStatus["CONFIRMED"] = "CONFIRMED";
BookingStatus["CANCELLED"] = "CANCELLED";
BookingStatus["COMPLETED"] = "COMPLETED";
BookingStatus["NO_SHOW"] = "NO_SHOW";
})(BookingStatus || (exports.BookingStatus = BookingStatus = {}));
// ===== Order =====
var OrderStatus;
(function (OrderStatus) {
OrderStatus["PENDING"] = "PENDING";
OrderStatus["PAID"] = "PAID";
OrderStatus["REFUNDED"] = "REFUNDED";
})(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
//# sourceMappingURL=enums.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":";;;AAAA,mBAAmB;AACnB,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,2BAAe,CAAA;AACjB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAED,uBAAuB;AACvB,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;IACrB,mCAAe,CAAA;AACjB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,yBAAyB;AACzB,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,uBAAuB;AACvB,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,sBAAsB;AACtB,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,oBAAoB;AACpB,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,oCAAqB,CAAA;AACvB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WEEKDAY_LABELS = exports.DATE_SELECTOR_DAYS = exports.TIME_PERIODS = exports.SLOT_GENERATION_DAYS = exports.DEFAULT_SLOT_CAPACITY = exports.DEFAULT_CANCEL_HOURS_LIMIT = exports.OrderStatus = exports.BookingStatus = exports.TimeSlotSource = exports.TimeSlotStatus = exports.MembershipStatus = exports.CardTypeCategory = exports.UserRole = void 0;
// Enums
var enums_1 = require("./enums");
Object.defineProperty(exports, "UserRole", { enumerable: true, get: function () { return enums_1.UserRole; } });
Object.defineProperty(exports, "CardTypeCategory", { enumerable: true, get: function () { return enums_1.CardTypeCategory; } });
Object.defineProperty(exports, "MembershipStatus", { enumerable: true, get: function () { return enums_1.MembershipStatus; } });
Object.defineProperty(exports, "TimeSlotStatus", { enumerable: true, get: function () { return enums_1.TimeSlotStatus; } });
Object.defineProperty(exports, "TimeSlotSource", { enumerable: true, get: function () { return enums_1.TimeSlotSource; } });
Object.defineProperty(exports, "BookingStatus", { enumerable: true, get: function () { return enums_1.BookingStatus; } });
Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return enums_1.OrderStatus; } });
// Constants
var constants_1 = require("./constants");
Object.defineProperty(exports, "DEFAULT_CANCEL_HOURS_LIMIT", { enumerable: true, get: function () { return constants_1.DEFAULT_CANCEL_HOURS_LIMIT; } });
Object.defineProperty(exports, "DEFAULT_SLOT_CAPACITY", { enumerable: true, get: function () { return constants_1.DEFAULT_SLOT_CAPACITY; } });
Object.defineProperty(exports, "SLOT_GENERATION_DAYS", { enumerable: true, get: function () { return constants_1.SLOT_GENERATION_DAYS; } });
Object.defineProperty(exports, "TIME_PERIODS", { enumerable: true, get: function () { return constants_1.TIME_PERIODS; } });
Object.defineProperty(exports, "DATE_SELECTOR_DAYS", { enumerable: true, get: function () { return constants_1.DATE_SELECTOR_DAYS; } });
Object.defineProperty(exports, "WEEKDAY_LABELS", { enumerable: true, get: function () { return constants_1.WEEKDAY_LABELS; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,iCAQgB;AAPd,iGAAA,QAAQ,OAAA;AACR,yGAAA,gBAAgB,OAAA;AAChB,yGAAA,gBAAgB,OAAA;AAChB,uGAAA,cAAc,OAAA;AACd,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,oGAAA,WAAW,OAAA;AAGb,YAAY;AACZ,yCAOoB;AANlB,uHAAA,0BAA0B,OAAA;AAC1B,kHAAA,qBAAqB,OAAA;AACrB,iHAAA,oBAAoB,OAAA;AACpB,yGAAA,YAAY,OAAA;AACZ,+GAAA,kBAAkB,OAAA;AAClB,2GAAA,cAAc,OAAA"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=api.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"api.js","sourceRoot":"","sources":["api.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=booking.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"booking.js","sourceRoot":"","sources":["booking.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=card-type.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"card-type.js","sourceRoot":"","sources":["card-type.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=membership.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"membership.js","sourceRoot":"","sources":["membership.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=order.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"order.js","sourceRoot":"","sources":["order.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=studio.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"studio.js","sourceRoot":"","sources":["studio.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=time-slot.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"time-slot.js","sourceRoot":"","sources":["time-slot.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=user.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=week-template.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"week-template.js","sourceRoot":"","sources":["week-template.ts"],"names":[],"mappings":""}

View File

@@ -3,6 +3,8 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"module": "CommonJS",
"moduleResolution": "node",
"declaration": true,
"declarationMap": true
},