* feat: wip refactor schema builder * feat: wip store types and first queries generation * feat: refactor schema-builder and resolver-builder * fix: clean & small type fix * fix: avoid breaking change * fix: remove util from pg-graphql classes * fix: required default fields * Refactor frontend accordingly --------- Co-authored-by: Charles Bochet <charles@twenty.com>
29 lines
775 B
TypeScript
29 lines
775 B
TypeScript
import { ObjectMetadataInterface } from 'src/tenant/schema-builder/interfaces/object-metadata.interface';
|
|
|
|
import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';
|
|
|
|
export const moneyObjectDefinition = {
|
|
id: FieldMetadataType.MONEY.toString(),
|
|
nameSingular: 'Money',
|
|
namePlural: 'Money',
|
|
labelSingular: 'Money',
|
|
labelPlural: 'Money',
|
|
targetTableName: 'money',
|
|
fields: [
|
|
{
|
|
id: 'amount',
|
|
type: FieldMetadataType.NUMBER,
|
|
name: 'amount',
|
|
label: 'Amount',
|
|
targetColumnMap: { value: 'amount' },
|
|
},
|
|
{
|
|
id: 'currency',
|
|
type: FieldMetadataType.TEXT,
|
|
name: 'currency',
|
|
label: 'Currency',
|
|
targetColumnMap: { value: 'currency' },
|
|
},
|
|
],
|
|
} as ObjectMetadataInterface;
|