mirror of
https://github.com/twentyhq/twenty.git
synced 2024-09-11 23:37:21 +03:00
parent
47d7e19570
commit
7d80610428
@ -0,0 +1,37 @@
|
||||
import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';
|
||||
import { FieldMetadata } from 'src/workspace/workspace-sync-metadata/decorators/field-metadata.decorator';
|
||||
import { Gate } from 'src/workspace/workspace-sync-metadata/decorators/gate.decorator';
|
||||
import { IsSystem } from 'src/workspace/workspace-sync-metadata/decorators/is-system.decorator';
|
||||
import { ObjectMetadata } from 'src/workspace/workspace-sync-metadata/decorators/object-metadata.decorator';
|
||||
import { BaseObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/base.object-metadata';
|
||||
import { WorkspaceMemberObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/workspace-member.object-metadata';
|
||||
|
||||
@ObjectMetadata({
|
||||
namePlural: 'blocklists',
|
||||
labelSingular: 'Blocklist',
|
||||
labelPlural: 'Blocklists',
|
||||
description: 'Blocklist',
|
||||
icon: 'IconForbid2',
|
||||
})
|
||||
@Gate({
|
||||
featureFlag: 'IS_MESSAGING_ENABLED',
|
||||
})
|
||||
@IsSystem()
|
||||
export class BlocklistObjectMetadata extends BaseObjectMetadata {
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Handle',
|
||||
description: 'Handle',
|
||||
icon: 'IconAt',
|
||||
})
|
||||
handle: string;
|
||||
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'WorkspaceMember',
|
||||
description: 'WorkspaceMember',
|
||||
icon: 'IconCircleUser',
|
||||
joinColumn: 'workspaceMemberId',
|
||||
})
|
||||
workspaceMember: WorkspaceMemberObjectMetadata;
|
||||
}
|
@ -2,6 +2,7 @@ import { ActivityTargetObjectMetadata } from 'src/workspace/workspace-sync-metad
|
||||
import { ActivityObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/activity.object-metadata';
|
||||
import { ApiKeyObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/api-key.object-metadata';
|
||||
import { AttachmentObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/attachment.object-metadata';
|
||||
import { BlocklistObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/blocklist.object-metadata';
|
||||
import { CommentObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/comment.object-metadata';
|
||||
import { CompanyObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/company.object-metadata';
|
||||
import { ConnectedAccountObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/connected-account.object-metadata';
|
||||
@ -26,6 +27,7 @@ export const standardObjectMetadataCollection = [
|
||||
ActivityObjectMetadata,
|
||||
ApiKeyObjectMetadata,
|
||||
AttachmentObjectMetadata,
|
||||
BlocklistObjectMetadata,
|
||||
CommentObjectMetadata,
|
||||
CompanyObjectMetadata,
|
||||
ConnectedAccountObjectMetadata,
|
||||
|
@ -10,6 +10,7 @@ import { RelationMetadata } from 'src/workspace/workspace-sync-metadata/decorato
|
||||
import { ActivityObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/activity.object-metadata';
|
||||
import { AttachmentObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/attachment.object-metadata';
|
||||
import { BaseObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/base.object-metadata';
|
||||
import { BlocklistObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/blocklist.object-metadata';
|
||||
import { CommentObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/comment.object-metadata';
|
||||
import { CompanyObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/company.object-metadata';
|
||||
import { ConnectedAccountObjectMetadata } from 'src/workspace/workspace-sync-metadata/standard-objects/connected-account.object-metadata';
|
||||
@ -192,4 +193,21 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
|
||||
})
|
||||
@IsNullable()
|
||||
messageParticipants: MessageParticipantObjectMetadata[];
|
||||
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Blocklist',
|
||||
description: 'Blocklisted handles',
|
||||
icon: 'IconForbid2',
|
||||
})
|
||||
@RelationMetadata({
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
objectName: 'blocklist',
|
||||
inverseSideFieldName: 'workspaceMember',
|
||||
})
|
||||
@Gate({
|
||||
featureFlag: 'IS_MESSAGING_ENABLED',
|
||||
})
|
||||
@IsNullable()
|
||||
blocklist: BlocklistObjectMetadata[];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user