---
title: "Role"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/entity/role/role.entity.ts" sourceLine="16" packageName="@vendure/core" />

A Role represents a collection of permissions which determine the authorization
level of a <DocsLink href="/reference/typescript-api/entities/user#user">User</DocsLink> on a given set of <DocsLink href="/reference/typescript-api/entities/channel#channel">Channel</DocsLink>s.

```ts title="Signature"
class Role extends VendureEntity implements ChannelAware {
    constructor(input?: DeepPartial<Role>)
    @Column() code: string;
    @Column() description: string;
    @Column('simple-array') permissions: Permission[];
    @ManyToMany(type => Channel, channel => channel.roles)
    @JoinTable()
    channels: Channel[];
}
```
* Extends: <DocsLink href="/reference/typescript-api/entities/vendure-entity#vendureentity">`VendureEntity`</DocsLink>


* Implements: <DocsLink href="/reference/typescript-api/entities/interfaces#channelaware">`ChannelAware`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(input?: DeepPartial<<a href='/reference/typescript-api/entities/role#role'>Role</a>>) => Role`}   />


### code

<MemberInfo kind="property" type={`string`}   />


### description

<MemberInfo kind="property" type={`string`}   />


### permissions

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/common/permission#permission'>Permission</a>[]`}   />


### channels

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/entities/channel#channel'>Channel</a>[]`}   />




</div>
