database.puml 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @startuml Database
  2. entity User {
  3. * id
  4. __
  5. * name
  6. * username
  7. * status
  8. * password
  9. _
  10. * role_id
  11. }
  12. entity Role {
  13. * id
  14. __
  15. * name
  16. }
  17. entity Customer {
  18. * id
  19. __
  20. * name
  21. * address
  22. * phone
  23. * npwp
  24. }
  25. entity Product {
  26. * id
  27. __
  28. * number
  29. * name
  30. * unit
  31. }
  32. entity Supplier {
  33. * id
  34. __
  35. * name
  36. * address
  37. * phone
  38. * email
  39. * npwp
  40. }
  41. entity Purchase {
  42. * id
  43. __
  44. * number
  45. * status
  46. __
  47. * supplier_id
  48. * user_id
  49. }
  50. entity Sales {
  51. * id
  52. __
  53. * number
  54. * status
  55. __
  56. * customer_id
  57. * user_id
  58. }
  59. entity StockProduct {
  60. * id
  61. __
  62. * purchase_number
  63. * sale_number
  64. * amount
  65. __
  66. * product_number
  67. }
  68. entity Price {
  69. * id
  70. __
  71. * price
  72. __
  73. * product_number
  74. * customer_id
  75. * supplier_id
  76. }
  77. entity SaleDetail {
  78. * id
  79. __
  80. * price
  81. * ppn
  82. * qty
  83. __
  84. * sale_id
  85. * product_number
  86. }
  87. entity PurchaseDetail {
  88. * id
  89. __
  90. * price
  91. * ppn
  92. * qty
  93. __
  94. * purchase_number
  95. * product_number
  96. }
  97. User ||--|{ Role
  98. Purchase ||--|{ Supplier
  99. Purchase ||--|{ User
  100. Sales ||--|{ Customer
  101. Sales ||--|{ User
  102. StockProduct ||--|{ Product
  103. PurchaseDetail ||--|{ Purchase
  104. PurchaseDetail ||--|{ Product
  105. SaleDetail ||--|| Sales
  106. SaleDetail ||--|{ Product
  107. Product ||--|| Price