Skip to content

Instantly share code, notes, and snippets.

@henriqueweiand
Last active March 9, 2024 18:54
Show Gist options
  • Save henriqueweiand/a0f70aadd295b27690ee8972e15901cc to your computer and use it in GitHub Desktop.
Save henriqueweiand/a0f70aadd295b27690ee8972e15901cc to your computer and use it in GitHub Desktop.
import { Entity } from "@app/core/entities/entity";
export interface ProductProps {
id?: string
title: string
price: number
}
export class Product extends Entity<ProductProps> {
constructor(props: ProductProps) {
super(props);
}
get id(): string {
return this.props.id;
}
get title(): string {
return this.props.title;
}
get price(): number {
return this.props.price;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment