chore: 搭建 monorepo 脚手架与本地开发依赖环境

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nixevol
2026-06-28 15:22:31 +08:00
co-authored by Cursor
parent 1fc3f82155
commit 3e9ab08881
15 changed files with 478 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
// 全局常量。
export const QUEUE_NAMES = {
GEN_CODE: 'gen-code',
IMPORT_OUTBOUND: 'import-outbound',
WATERMARK: 'watermark',
ONCHAIN: 'onchain',
} as const;
// 公开随机短码长度(Base62)
export const SHORT_CODE_LENGTH = 10;
// 上传限制
export const MAX_IMAGE_SIZE = 10 * 1024 * 1024; // 10MB
export const MAX_VIDEO_SIZE = 100 * 1024 * 1024; // 100MB
export const MAX_FILE_SIZE = 20 * 1024 * 1024; // 20MB
export const ALLOWED_IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/webp', 'image/gif'];
export const ALLOWED_VIDEO_TYPES = ['video/mp4', 'video/webm', 'video/quicktime'];
export const ALLOWED_DOC_TYPES = ['application/pdf', 'image/jpeg', 'image/png'];
// 出库导入模板列定义(导入解析与模板下载共用,保证表头一致)
export interface ImportColumn {
key: string;
header: string;
required: boolean;
note: string;
example: string;
}
export const OUTBOUND_IMPORT_COLUMNS: ImportColumn[] = [
{ key: 'shortCode', header: '短码', required: true, note: '必填,生码导出文件中的随机短码', example: 'a8K3pQ9x2M' },
{ key: 'sku', header: 'SKU', required: false, note: '选填,产品 SKU', example: 'SKU-2024-001' },
{ key: 'archiveNo', header: '档案编号', required: false, note: '选填,本件档案编号', example: 'AW-0001' },
{ key: 'outTime', header: '出库时间', required: false, note: '选填,格式 YYYY-MM-DD HH:mm', example: '2024-06-01 10:00' },
{ key: 'remark', header: '备注', required: false, note: '选填', example: '' },
];