Skip to content

Commit 2adce07

Browse files
committed
feat(api): 将 master_detail 方法重命名为 masterDetail,统一命名风格
1 parent acab5cd commit 2adce07

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/crm/src/domains/crm/contact.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const Contact = ObjectSchema.create({
3030
}),
3131

3232
// Relationship: Link to Account (Master-Detail)
33-
account: Field.master_detail('account', {
33+
account: Field.masterDetail('account', {
3434
label: 'Account',
3535
required: true,
3636
writeRequiresMasterRead: true,

packages/spec/src/data/field.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ describe('Field Factory Helpers', () => {
412412
});
413413

414414
it('should create master_detail field', () => {
415-
const masterDetailField = Field.master_detail('parent_object', {
415+
const masterDetailField = Field.masterDetail('parent_object', {
416416
label: 'Parent',
417417
deleteBehavior: 'cascade',
418418
});

packages/spec/src/data/field.zod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export const Field = {
188188
...config
189189
} as const),
190190

191-
master_detail: (reference: string, config: FieldInput = {}) => ({
191+
masterDetail: (reference: string, config: FieldInput = {}) => ({
192192
type: 'master_detail',
193193
reference,
194194
...config

0 commit comments

Comments
 (0)