permission

Tables (13)

actions

  • action_id — SERIAL — Primary key — NOT NULL
  • action_name — VARCHAR(50) — NOT NULL

menu

  • menu_id — SERIAL — Primary key — NOT NULL
  • upper_menu_id — INT — Foreign key → menu.menu_id
  • depth — INT
  • menu_url — VARCHAR(250)
  • active — BOOLEAN

menu_roles

  • menu_id — INT — Foreign key → menu.menu_id — NOT NULL
  • role_id — INT — Foreign key → roles.role_id — NOT NULL

methods

  • Key — SERIAL — Primary key — NOT NULL
  • path — VARCHAR(250) — NOT NULL
  • method — VARCHAR(50)

organization

  • og_id — SERIAL — Primary key — NOT NULL
  • og_name — VARCHAR(50)

pages

  • page_id — SERIAL — Primary key — NOT NULL
  • menu_id — INT — Foreign key → menu.menu_id — NOT NULL
  • page_url — VARCHAR(255) — NOT NULL

role_methods

  • role_id — INT — Foreign key → roles.role_id — NOT NULL
  • method_id — INT — Foreign key → methods.Key — NOT NULL

role_page_actions

  • page_id — INT — Foreign key → pages.page_id — NOT NULL
  • action_id — INT — Foreign key → actions.action_id — NOT NULL
  • role_id — INT — Foreign key → roles.role_id — NOT NULL

roles

  • role_id — SERIAL — Primary key — NOT NULL
  • role_name — VARCHAR(50) — NOT NULL

service

  • service_id — SERIAL — Primary key — NOT NULL
  • service_name — VARCHAR(50)

service_role_organizations

  • og_id — INT — Foreign key → organization.og_id — NOT NULL
  • service_id — INT — Foreign key → service.service_id — NOT NULL
  • role_id — INT — Foreign key → roles.role_id — NOT NULL

user_roles

  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • role_id — INT — Foreign key → roles.role_id — NOT NULL

users

  • user_id — SERIAL — Primary key — NOT NULL
  • username — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255) — NOT NULL