main
This commit is contained in:
71
src/modules/admin/dto/admin.dto.ts
Normal file
71
src/modules/admin/dto/admin.dto.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import { Exclude, Expose, Type } from 'class-transformer';
|
||||
|
||||
@Exclude()
|
||||
export class PermissionResponseDto {
|
||||
@Expose()
|
||||
id: string;
|
||||
|
||||
@Expose()
|
||||
name: string;
|
||||
|
||||
@Expose()
|
||||
description: string | null;
|
||||
|
||||
@Expose()
|
||||
resource: string;
|
||||
|
||||
@Expose()
|
||||
action: string;
|
||||
|
||||
@Expose()
|
||||
createdAt: Date;
|
||||
|
||||
@Expose()
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
@Exclude()
|
||||
export class RoleResponseDto {
|
||||
@Expose()
|
||||
id: string;
|
||||
|
||||
@Expose()
|
||||
name: string;
|
||||
|
||||
@Expose()
|
||||
description: string | null;
|
||||
|
||||
@Expose()
|
||||
@Type(() => PermissionResponseDto)
|
||||
permissions?: PermissionResponseDto[];
|
||||
|
||||
@Expose()
|
||||
createdAt: Date;
|
||||
|
||||
@Expose()
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
@Exclude()
|
||||
export class UserRoleResponseDto {
|
||||
@Expose()
|
||||
userId: string;
|
||||
|
||||
@Expose()
|
||||
roleId: string;
|
||||
|
||||
@Expose()
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
@Exclude()
|
||||
export class RolePermissionResponseDto {
|
||||
@Expose()
|
||||
roleId: string;
|
||||
|
||||
@Expose()
|
||||
permissionId: string;
|
||||
|
||||
@Expose()
|
||||
createdAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user