view models
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { TeamJoinRequestItemDto } from '../dtos';
|
||||
// Note: No generated DTO available for TeamJoinRequest yet
|
||||
interface TeamJoinRequestDTO {
|
||||
id: string;
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
requestedAt: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export class TeamJoinRequestViewModel implements TeamJoinRequestItemDto {
|
||||
export class TeamJoinRequestViewModel {
|
||||
id: string;
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
@@ -10,7 +17,7 @@ export class TeamJoinRequestViewModel implements TeamJoinRequestItemDto {
|
||||
private currentUserId: string;
|
||||
private isOwner: boolean;
|
||||
|
||||
constructor(dto: TeamJoinRequestItemDto, currentUserId: string, isOwner: boolean) {
|
||||
constructor(dto: TeamJoinRequestDTO, currentUserId: string, isOwner: boolean) {
|
||||
Object.assign(this, dto);
|
||||
this.currentUserId = currentUserId;
|
||||
this.isOwner = isOwner;
|
||||
|
||||
Reference in New Issue
Block a user