Files
curriculum-project-hub/spec/Spec/System/User.lean
T
sjfhsjfh 39bd2c9ff7 feat(spec): pin org-feishu app binding to 1:1
- FeishuConnection.lean: FeishuAppBinding (appId + appSecretEnvelope)
- Organization.feishu: Option FeishuAppBinding (Option 自带 1:1)
- 删除 FeishuConnectionId (不再需要游离类型)
- FeishuProfile 删除 connection 字段 (由 org 隐含)
2026-07-12 09:29:41 +08:00

26 lines
780 B
Lean4

import Spec.Prelude
/-!
# User —— 飞书绑定
飞书身份是用户的绑定(登录途径),不是用户本体。用户实体见 `Hierarchy.User`。
用户创建当前只钉管理员直接创建;飞书自助注册→管理员审批未钉死(`OPEN`)。
-/
namespace Spec.System
variable (I : Identifiers)
/-- 飞书用户信息(`PINNED`)。User 上的可选飞书绑定载荷。 -/
structure FeishuProfile where
/-- 应用内身份(`OPEN` 表示);调飞书 API 的直接句柄,换应用即变。 -/
openId : I.FeishuOpenId
/-- 租户内身份(`OPEN` 表示);换应用不变,比 open_id 稳定。 -/
userId : I.FeishuUserId
/-- 飞书显示名(`OPEN`)。 -/
name : Option String
/-- 飞书头像 URL(`OPEN`)。 -/
avatarUrl : Option String
end Spec.System