feat(backend): Bienenstaende-Modul (Modul 2)
ApiariesModule: CRUD + Deactivate. Lesen fuer alle authentifizierten Rollen offen, Schreiben (Anlegen/Aendern/Deaktivieren) auf ADMIN und BEEKEEPER beschraenkt (Lastenheft §3.2: Imker verwaltet Bienenstaende). Audit-Log-Eintraege bei Create/Update/Deactivate ueber AuditLogService. 4 Unit-Tests + 4 e2e-Tests (inkl. Rollenpruefung READONLY vs. BEEKEEPER), Lint, Typecheck und Build gruen.
This commit is contained in:
1 parent
029484f9d5
commit
5c92c810e1
9 files changed
+379
-1
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
|
||||
import { IsLatitude, IsLongitude, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class CreateApiaryDto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
name!: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
location?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsLatitude()
|
||||
latitude?: number;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsLongitude()
|
||||
longitude?: number;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
address?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
Reference in new issue
Block a user