title: Store decimal number with TypeORM and BigNumber.js
body: <p>on my entity decimal field looks like this:</p>
  <pre><code>  @Column('decimal', { precision: 10, scale: 2 })
    amount!: BigNumber
  </code></pre>
  <p>I map this entity field from my DTO, which handle request body of nest js controller. In DTO I have defines field like this:</p>
  <pre><code>  @Transform(value =&gt; new BigNumber(value))
    amount!: BigNumber
  </code></pre>
  <p>when I remove <code>@Transform(value =&gt; new BigNumber(value))</code> code start working but amount field of DTO isn't BigNumber object, just holds string with amount. In my service component need use BigNumber's functions but I can't because this amount behaves like a string.</p>
  <p>For instance, when I call <code>*.compareTo()</code> on DTO field, I got error that there is no function <code>compareTo</code>, if I added @Transform decorator to DTO, <code>compareTo</code> and other functions works fine, but I have error in DB. I am using postgres. Thank you for any advice.</p>