feat: models default views

This commit is contained in:
Ahmed Bouhuolia
2025-06-17 20:53:13 +02:00
parent f624cf7ae6
commit 437bcb8854
39 changed files with 286 additions and 275 deletions

View File

@@ -0,0 +1,44 @@
import { ApiProperty } from '@nestjs/swagger';
import { ViewColumn } from '../models/ViewColumn.model';
import { RoleResponseDto } from './RoleResponse.dto';
export class ViewResponseDto {
@ApiProperty({ description: 'The unique identifier of the view' })
id: number;
@ApiProperty({ description: 'The name of the view' })
name: string;
@ApiProperty({ description: 'The slug of the view' })
slug: string;
@ApiProperty({ description: 'Whether the view is predefined' })
predefined: boolean;
@ApiProperty({ description: 'The resource model associated with the view' })
resourceModel: string;
@ApiProperty({ description: 'Whether the view is marked as favourite' })
favourite: boolean;
@ApiProperty({ description: 'The roles logic expression for the view' })
rolesLogicExpression: string;
@ApiProperty({
type: [RoleResponseDto],
description: 'The roles associated with the view',
})
roles: RoleResponseDto[];
@ApiProperty({
type: [ViewColumn],
description: 'The columns associated with the view',
})
columns: ViewColumn[];
@ApiProperty({ description: 'The creation timestamp' })
createdAt: Date;
@ApiProperty({ description: 'The last update timestamp' })
updatedAt: Date;
}