fix: harden DingTalk student synchronization

This commit is contained in:
2026-07-18 14:51:53 +08:00
parent d25e451b61
commit c11f6bb614
15 changed files with 758 additions and 356 deletions

View File

@@ -1,8 +1,8 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
export type SyncPlatform = 'dingtalk' | 'wecom';
export type SyncPlatform = 'dingtalk_students' | 'dingtalk_attendance' | 'wecom';
export type SyncType = 'full' | 'incremental';
export type SyncStatus = 'running' | 'success' | 'failed';
export type SyncStatus = 'running' | 'success' | 'partial' | 'failed';
@Entity('sync_logs')
export class SyncLog {

View File

@@ -8,4 +8,10 @@ export class SyncState {
@Column({ name: 'last_sync_at', type: 'datetime', nullable: true })
lastSyncAt: Date | null;
@Column({ name: 'run_id', type: 'varchar', length: 64, nullable: true })
runId: string | null;
@Column({ name: 'running_since', type: 'datetime', nullable: true })
runningSince: Date | null;
}