2.9.2. Database Design

@startuml

class acls {
  Integer id
  Integer user_id
  Integer talkgroup_id
  Boolean tx
  Boolean rx
}

class announcements {
  Integer id
  date date
  string message
}

class blacklists {
  Integer id
  Integer dmrid
  string  reason
  Integer user_id
}

class callogs {
  Integer id
  Integer dmrid_id
  Integer streamid
  Integer talkgroup_id
  date start
  date end
  Integer peer_id
  Integer timeslot
}

class dmrids {
  Integer id
  String callsign
  Integer user_id
  Integer failurecount
  boolean mailsent
}

class dynamics {
  Integer id
  Integer dmrid
  Integer talkgroup
  Integer slot
  Integer peer
}

class group_admins {
  Integer user_id
  Integer raynet_group_id
  Boolean active
}

class lastheards {
  Integer id
  Integer dmrid_id
  Integer source
  Integer talkgroup_id
  datetime start
  datetime end
  Integer peer_id
  Integer timeslots
}

class logs {
  Integer user_id
  string msg
}

class memberships {
  Integer user_id
  Integer raynet_group_id
  Boolean active
}

class ob_talkgroups {
  Integer id
  Integer talkgroup_id
  Integer openbridge_id
  boolean active
  Integer dest_talkgroup
  Integer dest_slot
}

class openbridges {
  Integer id
  string ip
  Integer port
  string name
  string password
  boolean active
  Integer remotedmrid
  Integer localdmrid
  string location
  string URL
}

class peers {
  Integer id
  date last_ping
  Integer pings_received
  date connected
  string ip
  Integer port
  Integer salt
  string callsign
  string location
  Integer user_id
  string peer_password
  boolean duplex
  boolean repeater
  boolean notify
  boolean notified
  string software
  Integer RX_Freq
  Integer TX_Freq
  Integer TX_power
  Integer colorcode
  Integer latitude
  Integer longitude
  Integer height
  string description
  Integer slots
  string url
  string package
  Integer authcount
  boolean mailsent
  Integer authreqcount
  string token
  string name
  boolean blocked
}

class radioids {
  Interger id
  String fname
  String name
  String country
  String callsign
  String city
  String surname
  String radio_id
  String remarks
  String state
}

Class raynet_groups {
  String name
  String groupcode
  Integer number
  string prefix
  Integer zone_id
}

class repaterids {
  Integer id
  Integer locator
  string callsign
  string trustee
}

Class roles {
  String name
  String resource_type
  Integer resource_id
}

Class static_groups {
  Integer user_id
  Integer talkgroup_id
  Boolean active
}

Class talkgroups {
  String name
  Integer number
  Boolean active
  Integer raynet_group_id
  Boolean tx
  Boolean rx
  boolean closed
  boolean autoacl
}

Class tokens {
  String token
  String email
  Integer group_id
  Datetime lastsent
  Integer user_id
}

Class users {
  String password
  Boolean active
  String firstname
  String surname
  String hotspotpassword
  String email
  String reset_password_token
  String encrypted_password
  boolean repeaterkeeper
  boolean locked
}

Class user_roles {
  Integer user_id
  Integer role_id
}


@enduml