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.
 
 
 
 

48 lignes
1.2 KiB

  1. class Postcode
  2. include DataMapper::Resource
  3. property :id, Serial
  4. property :postcode, String, :required => true
  5. property :created_at, DateTime
  6. property :lat, Float
  7. property :lng, Float
  8. property :district_name, String
  9. property :district_code, String
  10. property :ward_name, String
  11. property :ward_code, String
  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. has n, :councilcandidates
  19. end
  20. class Party
  21. include DataMapper::Resource
  22. property :id, Serial
  23. property :name, String, :required => true
  24. has n, :councilcandidates
  25. end
  26. class Councilcandidate
  27. include DataMapper::Resource
  28. property :id, Serial
  29. property :ward_id, Integer, :required => true
  30. property :party_id, Integer, :required => true
  31. property :forenames, String
  32. property :surname, String
  33. property :address, String, :length => 200
  34. property :postcode, String
  35. belongs_to :party
  36. belongs_to :ward
  37. end