add new @WorkspaceIsSearchable decorator + updates services + add migration command (#10507)
closes https://github.com/twentyhq/core-team-issues/issues/345
This commit is contained in:
@ -69,6 +69,9 @@ export class ObjectMetadataDTO {
|
||||
@FilterableField()
|
||||
isSystem: boolean;
|
||||
|
||||
@FilterableField()
|
||||
isSearchable: boolean;
|
||||
|
||||
@HideField()
|
||||
workspaceId: string;
|
||||
|
||||
|
||||
@ -70,6 +70,9 @@ export class ObjectMetadataEntity implements ObjectMetadataInterface {
|
||||
@Column({ default: true })
|
||||
isAuditLogged: boolean;
|
||||
|
||||
@Column({ default: false })
|
||||
isSearchable: boolean;
|
||||
|
||||
@Column({ type: 'jsonb', nullable: true })
|
||||
duplicateCriteria?: WorkspaceEntityDuplicateCriteria[];
|
||||
|
||||
|
||||
@ -120,6 +120,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
isCustom: !objectMetadataInput.isRemote,
|
||||
isSystem: false,
|
||||
isRemote: objectMetadataInput.isRemote,
|
||||
isSearchable: !objectMetadataInput.isRemote,
|
||||
fields: objectMetadataInput.isRemote
|
||||
? []
|
||||
: buildDefaultFieldsForCustomObject(objectMetadataInput.workspaceId),
|
||||
|
||||
Reference in New Issue
Block a user