Election results in the London Borough of Sutton.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

58 lignes
1.6 KiB

  1. class Postcode
  2. include DataMapper::Resource
  3. property :id, Serial
  4. property :postcode, String, :required => true
  5. property :created_at, DateTime, :required => true
  6. property :lat, Float, :required => true
  7. property :lng, Float, :required => true
  8. property :district_name, String, :required => true
  9. property :district_code, String, :required => true
  10. property :ward_name, String, :required => true
  11. property :ward_code, String, :required => true
  12. end
  13. class Ward
  14. include DataMapper::Resource
  15. property :id, Serial
  16. property :ons_id, String, :required => true
  17. property :name, String, :required => true
  18. property :constituency_id, Integer, :required => true
  19. has n, :councilcandidates
  20. belongs_to :constituency
  21. end
  22. class Party
  23. include DataMapper::Resource
  24. property :id, Serial
  25. property :name, String, :required => true
  26. has n, :councilcandidates
  27. end
  28. class Councilcandidate
  29. include DataMapper::Resource
  30. property :id, Serial
  31. property :ward_id, Integer, :required => true
  32. property :party_id, Integer, :required => true
  33. property :forenames, String, :required => true
  34. property :surname, String, :required => true
  35. property :address, String, :length => 200
  36. property :postcode, String, :required => true
  37. belongs_to :party
  38. belongs_to :ward
  39. end
  40. class Constituency
  41. include DataMapper::Resource
  42. property :id, Serial
  43. property :name, String, :required => true
  44. has n, :wards
  45. end