mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:36:30 +00:00
15 lines
321 B
Cython
15 lines
321 B
Cython
import msgpack
|
|
|
|
cdef class User:
|
|
|
|
def __init__(self, str id, str email, RoleEnum role):
|
|
self.id = id
|
|
self.email = email
|
|
self.role = role
|
|
|
|
cdef bytes serialize(self):
|
|
return msgpack.packb({
|
|
"i": self.id,
|
|
"e": self.email,
|
|
"r": self.role
|
|
}) |