Skip to content

Commit

Permalink
#update: thuanvv update video_url field
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvanthuan committed Jan 22, 2025
1 parent 378c477 commit f45fe73
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function map(activityClass: ActivityClassDTO): ActivityClassDTO {
image: activityClass?.class?.image ?? null,
},
name: activityClass?.name ?? null,
video_url: activityClass.video_url ?? null,
image_url: activityClass.image_url ?? null,
status: activityClass.status,
order: activityClass.order ?? null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function makeListActivityClassQuery({ activityClassRepository, db }: Pick
image: enrichedClass.class.image ?? null,
},
name: enrichedClass.name ?? null,
video_url: enrichedClass.video_url ?? null,
image_url: enrichedClass.image_url ?? null,
status: enrichedClass.status,
order: enrichedClass.order ?? null,
Expand Down
1 change: 1 addition & 0 deletions src/domain/dtos/activity-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface ActivityClassDTO {
id: number | null;
class: IClass;
name: string | null;
video_url: string | null;
image_url: string | null;
status: number;
order: number | null;
Expand Down
3 changes: 3 additions & 0 deletions src/domain/entities/activity-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export class ActivityClassEntity {
public id?: number;
public class_id: number;
public name?: string | null;
public video_url?: string | null;
public image_url?: string | null;
public status: number;
public order?: number | null;
Expand All @@ -14,6 +15,7 @@ export class ActivityClassEntity {
id?: number;
class_id: number;
name?: string;
video_url?: string;
image_url?: string;
status: number;
order?: number;
Expand All @@ -25,6 +27,7 @@ export class ActivityClassEntity {
this.id = activityClassEntity.id;
this.class_id = activityClassEntity.class_id;
this.name = activityClassEntity.name;
this.video_url = activityClassEntity.video_url;
this.image_url = activityClassEntity.image_url;
this.status = activityClassEntity.status;
this.order = activityClassEntity.order;
Expand Down
1 change: 1 addition & 0 deletions src/web/routes/activity-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default async function activityClassRoutes(fastify: FastifyRouteInstance)
nullable: false,
},
name: { type: 'string', nullable: true },
video_url: { type: 'string', nullable: true },
image_url: { type: 'string', nullable: true },
status: { type: 'integer' },
order: { type: 'integer', nullable: true },
Expand Down

0 comments on commit f45fe73

Please sign in to comment.