Skip to content

v0.4.0

Latest
Compare
Choose a tag to compare
@kurotych kurotych released this 11 Nov 18:26
· 1 commit to main since this release

What's Changed

Improved readability and maintainability of PlantUML code by adding reusable components to the repository. Now using db_ent.puml from PUML Library.

New syntax example:

@startuml

hide circle
skinparam linetype ortho

!include https://raw.githubusercontent.com/kurotych/sqlant/b2e5db9ed8659f281208a687a344b34ff38129cd/puml-lib/db_ent.puml

table(customer) {
  column(id, "bigint", $pk=true, $nn=true)
  ---
  column(address, "text", $nn=true)
  column(name, "text", $nn=true)
  column(phone_number, "text", $nn=true)
  column(registered_at, "timestamp with time zone", $nn=true)
  column(zip_code, "text", $nn=true)
}

table(customer_order) {
  column(id, "bigint", $pk=true, $nn=true)
  ---
  column(customer_id, "bigint", $fk=true, $nn=true)
  column(delivery_method, "text", $nn=true)
  column(ordered_at, "timestamp with time zone", $nn=true)
  column(payment_method, "text", $nn=true)
  column(shipping_address, "text", $nn=true)
  column(total_price, "numeric", $nn=true)
  column(total_tax_amount, "numeric", $nn=true)
}

customer_order }o--|| customer

enum(product_category, "electronics, jewelry, home")

add_legend()
@enduml