Skip to content

Instantly share code, notes, and snippets.

@poying
Last active December 15, 2015 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poying/5343335 to your computer and use it in GitHub Desktop.
Save poying/5343335 to your computer and use it in GitHub Desktop.

資料庫規劃

users

  • id
  • login
  • name
  • email

contacts

聯絡人關聯

  • id
  • user_id
  • is_user

contactmeta

紀錄聯絡人資料

  • id
  • contact_id
  • key
  • val

ex:

{
  id: 0,
  contact_id: 0,
  key: 'email',
  val: 'test@gmail.com'
}

urls

  • id
  • url

crontabs

同一個 url 的 time 不會重複

  • id
  • url_id
  • time

profile

  • id
  • display_name
  • user_id
  • crontab_id

alerts

紀錄聯絡人關聯的情況

  • id
  • concat_id
  • profile_id
  • active

update

  • id
  • url_id
  • time

records

  • id
  • url_id
  • update_id
  • type - 這筆紀錄的類型 size/loadspeed
  • value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment