import { ObjectType, Field, InputType } from 'type-graphql'; import { RessourceEnum } from '@src/__components/components'; /* ███████╗███╗ ██╗██╗ ██╗███╗ ███╗ ██╔════╝████╗ ██║██║ ██║████╗ ████║ █████╗ ██╔██╗ ██║██║ ██║██╔████╔██║ ██╔══╝ ██║╚██╗██║██║ ██║██║╚██╔╝██║ ███████╗██║ ╚████║╚██████╔╝██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ */ /* ██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗███████╗ ██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝██╔════╝ ██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║ ███████╗ ██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║ ╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║ ███████║ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ */ @ObjectType() export class FavoriteComponent { @Field() ressourceId: string; @Field(() => RessourceEnum) ressourceType: RessourceEnum; @Field() addedAt: Date; @Field({ nullable: true }) favorite?: boolean; @Field({ nullable: true }) liked?: boolean; } @InputType() export class AddInput { @Field() ressourceId: string; @Field(() => RessourceEnum) ressourceType: RessourceEnum; } @InputType() export class RemoveInput { @Field() ressourceId: string; }