# Class Role

Role class

#### Implements

- AbstractRole

- Defined in packages/saltcorn-data/models/role.ts:18

##### Index

### Constructors

constructor

### Properties

id
role

### Methods

delete
update
create
find
findOne

## Constructors

### constructor

- new Role(o: AbstractRole): Role

  Role constructor

  #### Parameters

  - o: AbstractRole

  #### Returns Role

  - Defined in packages/saltcorn-data/models/role.ts:26

## Properties

### id

id: number

Implementation of AbstractRole.id

- Defined in packages/saltcorn-data/models/role.ts:19

### role

role: string

Implementation of AbstractRole.role

- Defined in packages/saltcorn-data/models/role.ts:20

## Methods

### delete

- delete(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/role.ts:72

### update

- update(row: Partial<Role>): Promise<void>

  #### Parameters

  - row: Partial<Role>

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/role.ts:81

### `Static` create

- create(uo: AbstractRole): Promise<Role | { error: string }>

  #### Parameters

  - uo: AbstractRole

  #### Returns Promise<Role | { error: string }>

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

### `Static` find

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

  #### Parameters

  - where: Where
  - `Optional` selectopts: SelectOptions

  #### Returns Promise<Role[]>

  - Defined in packages/saltcorn-data/models/role.ts:52

### `Static` findOne

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

  #### Parameters

  - where: Where

  #### Returns Promise<Role>

  - Defined in packages/saltcorn-data/models/role.ts:64