This commit is contained in:
2025-12-12 14:23:40 +01:00
parent 6a88fe93ab
commit 2cd3bfbb47
58 changed files with 2866 additions and 260 deletions

View File

@@ -16,7 +16,7 @@ export interface SponsorAccountProps {
passwordHash: string;
companyName: string;
isActive: boolean;
createdAt: Date;
createdAt?: Date;
lastLoginAt?: Date;
}
@@ -37,7 +37,7 @@ export class SponsorAccount {
this.passwordHash = props.passwordHash;
this.companyName = props.companyName;
this.isActive = props.isActive;
this.createdAt = props.createdAt;
this.createdAt = props.createdAt ?? new Date();
this.lastLoginAt = props.lastLoginAt;
}
@@ -128,7 +128,7 @@ export class SponsorAccount {
companyName: this.companyName,
isActive: false,
createdAt: this.createdAt,
lastLoginAt: this.lastLoginAt,
...(this.lastLoginAt ? { lastLoginAt: this.lastLoginAt } : {}),
});
}
@@ -145,7 +145,7 @@ export class SponsorAccount {
companyName: this.companyName,
isActive: this.isActive,
createdAt: this.createdAt,
lastLoginAt: this.lastLoginAt,
...(this.lastLoginAt ? { lastLoginAt: this.lastLoginAt } : {}),
});
}
}