jghibiki / mopey

A mopidy web client and api stack intended for a user request based music system. Will include a karma and user management system to help mitigate spam requests.
MIT License
1 stars 0 forks source link

Create Karma Threshold Models #57

Open jghibiki opened 9 years ago

jghibiki commented 9 years ago

Create karma threshold models. Should just be a simple table:

key upper lower

Then create an enum following this example:


>>> class Foo(object):
        bar  = 0
        baz  = 1
        quux = 2

>>> Foo.quux
2

for the following thresholds (for now):

Then insert rows into db where key = enum int value. e.g.

>>> thresholds.angel
1

which should have a DB mapping of:

key upper lower
1 1000 101

Enum value mapping to bounds:

JPisaBrony commented 9 years ago

I think cursed and devil should be switched because it sounds worse at least to me

jghibiki commented 9 years ago

Being a devil is a "fun" name like "angel". If you are "cursed" bad things start happening. Being a devil just means you are a terrible person - not that anything is going to happen to you. going from being a devil to cursed is the transition into punishment.

JPisaBrony commented 9 years ago

It's just my opinion we don't have to use it

jghibiki commented 9 years ago

Do you have a different adjective you can think of that sounds more serious and daunting than devil (to replace curse with)?

Additionally we could modify the ranges so that you can be a devil and cursed at the same time - they are not mutually exclusive.