refacto user targeted

This commit is contained in:
OxSaitama 2023-10-04 16:11:51 +02:00
parent a100398ef5
commit 16baf46d39
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import User from "./User";
import Vote from "./Vote";
export default class Appointment extends Resource {
uid?: string;
targeted_user: User;
user: User;
status: EAppointmentStatus | string;
votes?: Vote[];
choice: EVote | string;

View File

@ -30,7 +30,7 @@ __decorate([
(0, class_validator_1.ValidateNested)({ groups: ["createVote"] }),
(0, class_transformer_1.Type)(() => User_1.default),
__metadata("design:type", User_1.default)
], Appointment.prototype, "targeted_user", void 0);
], Appointment.prototype, "user", void 0);
__decorate([
(0, class_transformer_1.Expose)(),
__metadata("design:type", String)

View File

@ -12,7 +12,7 @@ export default class Appointment extends Resource {
@IsOptional({ groups: ["createVote"]})
@ValidateNested({ groups: ["createVote"] })
@Type(() => User)
public targeted_user!: User;
public user!: User;
@Expose()
public status!: EAppointmentStatus | string;