Last active
March 9, 2024 18:54
-
-
Save henriqueweiand/a0f70aadd295b27690ee8972e15901cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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