Import Feishu directory with optional 30-minute sync
This commit is contained in:
1 parent
4096b93da3
commit
e5375deeb2
10 files changed
+662
-3
No files matched your search
@@ -39,6 +39,39 @@ type IdentityProfile struct {
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// FeishuDirectorySync tracks a single application's import schedule and outcome.
|
||||
type FeishuDirectorySync struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Issuer string `gorm:"size:256"`
|
||||
AppID string `gorm:"size:128"`
|
||||
LastAttempt *time.Time `json:"last_attempt"`
|
||||
LastSuccess *time.Time `json:"last_success"`
|
||||
LastError string `gorm:"size:512" json:"last_error"`
|
||||
Departments int `json:"departments"`
|
||||
Members int `json:"members"`
|
||||
}
|
||||
|
||||
type FeishuDepartment struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Issuer string `gorm:"uniqueIndex:idx_feishu_department;size:256"`
|
||||
AppID string `gorm:"uniqueIndex:idx_feishu_department;size:128"`
|
||||
Department string `gorm:"uniqueIndex:idx_feishu_department;size:128"`
|
||||
Parent string `gorm:"size:128"`
|
||||
Name string `gorm:"size:256"`
|
||||
LastSeenAt time.Time
|
||||
}
|
||||
|
||||
type FeishuDirectoryMember struct {
|
||||
ID uint `gorm:"primaryKey" json:"-"`
|
||||
Issuer string `gorm:"uniqueIndex:idx_feishu_member;size:256" json:"-"`
|
||||
AppID string `gorm:"uniqueIndex:idx_feishu_member;size:128" json:"-"`
|
||||
OpenID string `gorm:"uniqueIndex:idx_feishu_member;size:128" json:"open_id"`
|
||||
Name string `gorm:"size:256" json:"name"`
|
||||
Departments string `gorm:"type:text" json:"department_ids"`
|
||||
LastSeenAt time.Time `json:"last_seen_at"`
|
||||
}
|
||||
|
||||
// FeishuTunnelGrant records explicit admission for a verified Feishu subject.
|
||||
type FeishuTunnelGrant struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
|
||||
Reference in new issue
Block a user