@startuml Database entity User { * id __ * name * username * status * password _ * role_id } entity Role { * id __ * name } entity Customer { * id __ * name * address * phone * npwp } entity Product { * id __ * number * name * unit } entity Supplier { * id __ * name * address * phone * email * npwp } entity Purchase { * id __ * number * status __ * supplier_id * user_id } entity Sales { * id __ * number * status __ * customer_id * user_id } entity StockProduct { * id __ * purchase_number * sale_number * amount __ * product_id } entity Price { * id __ * price __ * product_id * customer_id * supplier_id } entity SaleDetail { * id __ * price * ppn * qty __ * sale_id * product_id } entity PurchaseDetail { * id __ * price * ppn * qty __ * purchase_id * product_id } User ||--|{ Role Purchase ||--|{ Supplier Purchase ||--|{ User Sales ||--|{ Customer Sales ||--|{ User StockProduct ||--|{ Product PurchaseDetail ||--|{ Purchase PurchaseDetail ||--|{ Product SaleDetail ||--|{ Sales SaleDetail ||--|{ Product Product ||--|| Price