mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
SPRINT-1 related tasks done
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
import { Column, Entity } from 'typeorm';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
import { PermissionType } from '@app/common/constants/permission-type.enum';
|
||||
import { PermissionTypeDto } from '../dtos/permission.dto';
|
||||
|
||||
@Entity({ name: 'permission-type' })
|
||||
export class PermissionTypeEntity extends AbstractEntity<PermissionTypeDto> {
|
||||
@Column({
|
||||
nullable: false,
|
||||
enum: Object.values(PermissionType),
|
||||
})
|
||||
type: string;
|
||||
|
||||
constructor(partial: Partial<PermissionTypeEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user