@@ -7,6 +7,7 @@ import { Preference } from '../objects/preference.object.js';
77import { Project } from '../objects/project.object.js' ;
88import { Task } from '../objects/task.object.js' ;
99import { Category } from '../objects/category.object.js' ;
10+ import { BusinessUnit } from '../objects/business-unit.object.js' ;
1011import { Team , ProjectMembership } from '../objects/team.object.js' ;
1112import { Product , Invoice , InvoiceLine } from '../objects/invoice.object.js' ;
1213import { FieldZoo } from '../objects/field-zoo.object.js' ;
@@ -83,6 +84,24 @@ const categories = defineSeed(Category, {
8384 ] ,
8485} ) ;
8586
87+ // Org-chart hierarchy seeded by `name` external id; `parent` references another
88+ // record's name, building a 3-level tree the `tree` view renders.
89+ const businessUnits = defineSeed ( BusinessUnit , {
90+ mode : 'upsert' ,
91+ externalId : 'name' ,
92+ records : [
93+ { name : 'Acme Corporation' , kind : 'company' , manager : 'Dana Wong' , headcount : 0 } ,
94+ { name : 'Product & Engineering' , parent : 'Acme Corporation' , kind : 'division' , manager : 'Lena Ortiz' , headcount : 0 } ,
95+ { name : 'Platform' , parent : 'Product & Engineering' , kind : 'department' , manager : 'Sam Patel' , headcount : 12 } ,
96+ { name : 'Frontend Guild' , parent : 'Product & Engineering' , kind : 'department' , manager : 'Yuki Tan' , headcount : 9 } ,
97+ { name : 'Design Systems' , parent : 'Frontend Guild' , kind : 'team' , manager : 'Priya Rao' , headcount : 4 } ,
98+ { name : 'Go-To-Market' , parent : 'Acme Corporation' , kind : 'division' , manager : 'Marcus Bell' , headcount : 0 } ,
99+ { name : 'Sales' , parent : 'Go-To-Market' , kind : 'department' , manager : 'Erin Cole' , headcount : 18 } ,
100+ { name : 'Enterprise Sales' , parent : 'Sales' , kind : 'team' , manager : 'Tom Nyx' , headcount : 7 } ,
101+ { name : 'Marketing' , parent : 'Go-To-Market' , kind : 'department' , manager : 'Aria Kim' , headcount : 6 } ,
102+ ] ,
103+ } ) ;
104+
86105const teams = defineSeed ( Team , {
87106 mode : 'upsert' ,
88107 externalId : 'name' ,
@@ -195,4 +214,4 @@ const preferences = defineSeed(Preference, {
195214 ] ,
196215} ) ;
197216
198- export const ShowcaseSeedData = [ accounts , products , projects , tasks , categories , teams , memberships , fieldZoo , invoices , invoiceLines , preferences ] ;
217+ export const ShowcaseSeedData = [ accounts , products , projects , tasks , categories , businessUnits , teams , memberships , fieldZoo , invoices , invoiceLines , preferences ] ;
0 commit comments