Models for Control

Tables (8)

AuditProgram (audit_program)

  • id (Key) — Primary key — NOT NULL
  • name (Field)
  • due_date (Field2)
  • possible_results (Field5)
  • from_date (Field3)
  • parent_id (Field4)
  • to_date (Field6)

Control (controls)

  • id (Key) — Primary key — NOT NULL
  • author_id (Key2) — Foreign key → User.id — NOT NULL
  • audit_program_id (Key3) — Foreign key → AuditProgram.id — NOT NULL
  • title (Field)
  • status (Field2)
  • created_time (Field3)
  • updated_time (Field4)

Control Attribute (control_attributes)

  • id (Key) — Primary key — NOT NULL
  • name (Field)
  • view_group (Field2)
  • attr_group (Field3)

Control Attribute Data (control_attribute_data)

  • id (Key) — Primary key — NOT NULL
  • attribute_id (Key2) — Foreign key → Control Attribute.id — NOT NULL
  • control_id (Key3) — Foreign key → Control.id — NOT NULL
  • data (Field)

Test (tests)

  • id (Key) — Primary key — NOT NULL
  • control_id (Key2) — Foreign key → Control.id — NOT NULL
  • status (Field2)
  • created_time (Field3)
  • updated_time (Field4)
  • due_date (Field6)

Test Attribute (test_attributes)

  • id (Key) — Primary key — NOT NULL
  • control_id (Key2) — Foreign key → Control.id — NOT NULL
  • title (Field)
  • created_time (Field2)

User (users)

  • id (Key) — Primary key — NOT NULL
  • username (Key2) — NOT NULL
  • password (Field2)
  • frist_name (Field)
  • last_name (Field3)
  • is_admin (Field4)

User Control (user_control)

  • control_id (Key3) — Foreign key → Control.id — NOT NULL
  • user_id (Key4) — Foreign key → User.id — NOT NULL
  • position (Key2) — NOT NULL
  • assigned_time (Field)