process.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. old_request_format = {
  2. user=user, -- requesting user
  3. type="add_member", -- action
  4. params={user} -- action params
  5. }
  6. old_process_format = {
  7. type = "consent", -- delete
  8. id = nil,
  9. org_id = nil,
  10. request_id = nil, -- delete
  11. -- consent config
  12. majority_to_pass = 0.51, -- voting threshold
  13. votes_needed = nil,
  14. -- consent data
  15. total_votes = 0,
  16. votes_yes = {},
  17. votes_no = {}
  18. }
  19. new_process_format = {
  20. initiator = "user",
  21. org_id = 12314,
  22. module = "create_child_org", -- policy table lookup
  23. process_id = 8347,
  24. -- used to freeze voter eligibility
  25. timestamp = 1632850133, -- look into supporting other formats, overrides (turn based, etc.)
  26. data = {
  27. child_org_name = "oligarchy"
  28. }
  29. }
  30. --[[
  31. voting configuration:
  32. <quorum>
  33. minimum voters (ratio or const)
  34. maximum voters (ratio or const)
  35. <temporal quorum>
  36. minimum duration
  37. maximum duration
  38. --]]
  39. policy_table_format = {
  40. "create_child_org": {
  41. consent_threshold = 0.51,
  42. max_duration = 89324, -- seconds until vote closes if threshold not reached, or nil for no limit
  43. defer = nil, -- org id to defer to, or nil
  44. }
  45. }