Skip to content

Commit

Permalink
fix(orm): toJSON wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-bechara committed Oct 23, 2024
1 parent 1918252 commit 823f645
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/orm/orm.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ import { v4 as uuidV4 } from 'uuid';

import { OrmBigIntDto, OrmBigIntTimestampDto, OrmIntDto, OrmIntTimestampDto, OrmTimestampDto, OrmUuidDto, OrmUuidTimestampDto } from './orm.dto.out';

export abstract class OrmBaseEntity extends BaseEntity<AnyEntity, 'id'> { }
export abstract class OrmBaseEntity extends BaseEntity<AnyEntity, 'id'> {

/**
* Serializes current entity, can be extended in order to apply
* custom rules.
* @param args
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
public toJSON(...args: any[]): any {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return super.toJSON(...args);
}

}

export abstract class OrmIntEntity extends OrmBaseEntity implements OrmIntDto {

Expand Down

0 comments on commit 823f645

Please sign in to comment.