Skip to content

Commit

Permalink
feat(notification-service): adds actionMeta property to NotificationU…
Browse files Browse the repository at this point in the history
…ser model (#99)

* feat(notification-service): adds actionMeta property to NotificationUser model

RFIT-1121

* feat(notification-service): adds dynamic properties to notification user model

RFIT-1121

* fix(notification-service): code review fix

RFIT-1121

Co-authored-by: samarpan-b <[email protected]>
  • Loading branch information
vineet-suri and samarpan-b authored Dec 7, 2020
1 parent 72552d4 commit bbc1075
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {model, property, belongsTo} from '@loopback/repository';
import {model, property, belongsTo, AnyObject} from '@loopback/repository';
import {BaseEntity} from '@sourceloop/core';
import {Notification} from './notification.model';

@model({
name: 'notification_users',
settings: {
strict: false,
}
})
export class NotificationUser extends BaseEntity {
@property({
Expand Down Expand Up @@ -36,6 +39,20 @@ export class NotificationUser extends BaseEntity {
})
isRead?: boolean;

@property({
type: 'object',
required: false,
name: 'action_meta',
})
actionMeta?: AnyObject;

// Define well-known properties here

// Indexer property to allow additional data
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[prop: string]: any;


constructor(data?: Partial<NotificationUser>) {
super(data);
}
Expand Down

0 comments on commit bbc1075

Please sign in to comment.