Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. this.app ?= {}
  2. app = this.app
  3. utils = this.utils
  4.  
  5. app.model ?= {}
  6.  
  7. class app.model.WikipediaCompany extends utils.model.Model
  8.     @endpoint: '/sk3/api'
  9.     @modelname: 'wikipedia'
  10.     constructor: () ->
  11.         super()
  12.  
  13. # データは基本jsonのままでもいい気がする
  14. # とは言えunique keyだけは取り出しておきたい
  15. # あとリレーションとかもあるなら使っておきたい
  16. class app.model.SearchCompany extends utils.model.Model
  17.     @endpoint: '/sk3/api'
  18.     @modelname: 'searchcompany'
  19.     @relations: ->
  20.         {wikipedia_company: app.model.WikipediaCompany}
  21.     constructor: () ->
  22.         super()
  23.  
  24. utils.model.register_function(app.model.SearchCompany, 'search')
  25.  
  26. # class app.model.Company extends utils.model.Model
  27. #   @url: '/sk3/api/company'
  28. #   @returnkey: 'items'
  29. #   @relation: {sourceid: app.model.SearchCompany}
  30. #   constructor: () ->
  31. #       super()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top