示例#1
0
class ExampleEvent(Event):
    type = "example"

    attributes = (
        Attribute("id", type=int),
        Map("map", (Attribute("key"), )),
        Attribute("optional", type=bool, required=False),
    )
示例#2
0
class ExampleEvent(Event):
    type = 'example'

    attributes = (
        Attribute('id', type=int),
        Map('map', (Attribute('key'), )),
        Attribute('optional', type=bool, required=False),
    )