Files
dobotai-platform/internal/directory/profile.go
2026-07-23 10:55:25 +08:00

33 lines
755 B
Go

package directory
import (
"context"
"time"
)
const (
SourceFullSync = "full_sync"
SourceOnDemand = "on_demand"
)
// Profile is the minimum non-sensitive DingTalk directory record used by
// DobotAI. It deliberately excludes mobile, email, credentials and raw payloads.
type Profile struct {
StaffID string
UnionID string
Name string
Nickname string
JobTitle string
DepartmentIDs []string
DepartmentName string
MainDepartmentName string
Region string
EmploymentStatus string
Source string
SyncedAt time.Time
}
type SnapshotWriter interface {
UpsertDirectoryProfiles(ctx context.Context, tenantKey string, profiles []Profile) error
}