exchange icon indicating copy to clipboard operation
exchange copied to clipboard

Database structure

Open jaonoctus opened this issue 7 years ago • 6 comments

  • Migrations are in /database/migrations
  • Models are in /app

screenshot from 2018-02-19 16-14-39

TODO

  • [x] Fix decimals precision and scale.
  • [ ] Move models to /app/models folder. in progress
  • [ ] Use laravel-auditing to track changes.

jaonoctus avatar Feb 19 '18 15:02 jaonoctus

@vjoao @ibrunotome

What about it, guys?

jaonoctus avatar Feb 19 '18 16:02 jaonoctus

Hi, I think the decimal fields can't be 8,2, because much of the orders will be a big fraction like 0,00724 for example. I suggest a 16,8 like the binance uses.

  • I suggest move the models to a folder called Models in /app too.
  • Not related to the structure, but I suggest to use the laravel-auditing package too to track every single change on the models.

ibrunotome avatar Feb 19 '18 16:02 ibrunotome

@ibrunotome I totally agree!

I've updated this issue with a "TODO" section.

Thanks

jaonoctus avatar Feb 19 '18 16:02 jaonoctus

@jaonoctus, uses uuid in public reference (orders, by example), id integer is vulnerable, principally to inspect element, etc :)

vinyvicente avatar Feb 20 '18 12:02 vinyvicente

@vinyvicente Order information is already public. As UUIDs are 4 times larger than integers, this might reflect in storage problems in the future.

vjoao avatar Feb 20 '18 14:02 vjoao

@vinyvicente, I agree with @vjoao. But, for sensitive data, we can use hashids.

jaonoctus avatar Feb 20 '18 14:02 jaonoctus