import { Result, ValueObject } from '@modules/shared'; interface MoneyProps { amountVND: bigint; } export class Money extends ValueObject { get value(): bigint { return this.props.amountVND; } static create(amountVND: bigint): Result { if (amountVND <= 0n) { return Result.err('Số tiền phải lớn hơn 0'); } if (amountVND > 999_999_999_999n) { return Result.err('Số tiền vượt quá giới hạn cho phép'); } return Result.ok(new Money({ amountVND })); } }