Skip to content

Commit 7108ff3

Browse files
xuyushun441-sysos-zhuangclaude
authored
feat(platform-objects): drop unused team kind from sys_business_unit (ADR-0057 addendum D11) (#2143)
kind='team' collided head-on with the first-class sys_team object (hierarchical BusinessUnitGraphService vs flat TeamGraphService). kind is a display-only categorisation hint with zero repo usages, so narrow it to company|division|department|office|cost_center and drop the team picklist labels from the 4 generated locale bundles. No data migration. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cecbbdb commit 7108ff3

6 files changed

Lines changed: 15 additions & 6 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/platform-objects": minor
3+
---
4+
5+
Drop the unused `team` value from `sys_business_unit.kind` (ADR-0057 addendum D11).
6+
7+
The `team` kind collided head-on with the first-class `sys_team` object: a
8+
`kind='team'` business unit walks the hierarchical `BusinessUnitGraphService`,
9+
while `sys_team` is the flat better-auth collaboration grouping served by
10+
`TeamGraphService`. `kind` is a display-only categorisation hint (it does not
11+
change graph semantics) and had **zero** usages anywhere in the repo, so this is a
12+
safe narrowing with no data migration. New enum:
13+
`company | division | department | office | cost_center`.

packages/platform-objects/src/apps/translations/en.objects.generated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
599599
company: "company",
600600
division: "division",
601601
department: "department",
602-
team: "team",
603602
office: "office",
604603
cost_center: "cost_center"
605604
}

packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
599599
company: "Empresa",
600600
division: "División",
601601
department: "Departamento",
602-
team: "Equipo",
603602
office: "Oficina",
604603
cost_center: "Centro de coste"
605604
}

packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
599599
company: "会社",
600600
division: "事業部",
601601
department: "部門",
602-
team: "チーム",
603602
office: "オフィス",
604603
cost_center: "コストセンター"
605604
}

packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
599599
company: "公司",
600600
division: "事业部",
601601
department: "部门",
602-
team: "团队",
603602
office: "办公地点",
604603
cost_center: "成本中心"
605604
}

packages/platform-objects/src/identity/sys-business-unit.object.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
99
* `sys_team`** (which is the flat better-auth collaboration grouping).
1010
*
1111
* A single tenant typically has one `kind='company'` root, then nested
12-
* `division` / `department` / `team` / `office` nodes underneath. The
12+
* `division` / `department` / `office` nodes underneath. The
1313
* `kind` enum is purely a display/categorisation hint — the recursive
1414
* structure works identically regardless of value.
1515
*
@@ -94,7 +94,7 @@ export const SysBusinessUnit = ObjectSchema.create({
9494
}),
9595

9696
kind: Field.select(
97-
['company', 'division', 'department', 'team', 'office', 'cost_center'],
97+
['company', 'division', 'department', 'office', 'cost_center'],
9898
{
9999
label: 'Kind',
100100
required: true,

0 commit comments

Comments
 (0)