# Class Notification

Notification Class

- Defined in packages/saltcorn-data/models/notification.ts:28

##### Index

### Constructors

constructor

### Properties

body?
created
id?
link?
read
send_status?
title
user_id

### Methods

delete
mark_as_read
count
create
deleteRead
find
findOne
mark_as_read

## Constructors

### constructor

- new Notification(o: Notification | NotificationCfg): Notification

  Notification constructor

  #### Parameters

  - o: Notification | NotificationCfg

  #### Returns Notification

  - Defined in packages/saltcorn-data/models/notification.ts:42

## Properties

### `Optional` body

body?: string

- Defined in packages/saltcorn-data/models/notification.ts:32

### created

created: Date

- Defined in packages/saltcorn-data/models/notification.ts:30

### `Optional` id

id?: number

- Defined in packages/saltcorn-data/models/notification.ts:29

### `Optional` link

link?: string

- Defined in packages/saltcorn-data/models/notification.ts:33

### read

read: boolean

- Defined in packages/saltcorn-data/models/notification.ts:35

### `Optional` send_status

send_status?: "pending" | "sent"

- Defined in packages/saltcorn-data/models/notification.ts:36

### title

title: string

- Defined in packages/saltcorn-data/models/notification.ts:31

### user_id

user_id: number

- Defined in packages/saltcorn-data/models/notification.ts:34

## Methods

### delete

- delete(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/notification.ts:118

### mark_as_read

- mark_as_read(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/notification.ts:110

### `Static` count

- count(where: Where): Promise<number>

  #### Parameters

  - where: Where

  #### Returns Promise<number>

  - Defined in packages/saltcorn-data/models/notification.ts:126

### `Static` create

- create(notin: NotificationCfg): Promise<Notification>

  #### Parameters

  - notin: NotificationCfg

  #### Returns Promise<Notification>

  - Defined in packages/saltcorn-data/models/notification.ts:74

### `Static` deleteRead

- deleteRead(user_id: number): Promise<void>

  #### Parameters

  - user_id: number

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/notification.ts:122

### `Static` find

- find(where: Where, selectopts?: SelectOptions): Promise<Notification[]>

  #### Parameters

  - where: Where
  - `Optional` selectopts: SelectOptions

  #### Returns Promise<Notification[]>

  - Defined in packages/saltcorn-data/models/notification.ts:57

### `Static` findOne

- findOne(where: Where): Promise<Notification>

  #### Parameters

  - where: Where

  #### Returns Promise<Notification>

  - Defined in packages/saltcorn-data/models/notification.ts:69

### `Static` mark_as_read

- mark_as_read(where: Where): Promise<void>

  #### Parameters

  - where: Where

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/notification.ts:114