class AVO(ValueObject): a = Attr() b = Attr() c = Attr() d = Attr() e = Attr() f = Attr() g = Attr() h = Attr()
class Article(Entity): id: ArticleId = Attr() title: str = Attr() content: str = Attr() author: Author = Attr() created_at: datetime = Attr() updated_at: datetime = Attr(allow_none=True) deleted_at: datetime = Attr(allow_none=True) tags: List = Attr(default=list)
class AVO(ValueObject): a = Attr() @a.validator def is_integer(self, value): if isinstance(value, numbers.Integral): return True raise TypeError() @a.validator def between(self, value): return 0 < value < 100
class MotherVO(GrandmaVO): e = Attr() f = Attr()
class AnotherE(Entity): id = Attr() a = Attr() b = Attr()
class AE(Entity): id = Attr() a = Attr() b = Attr()
class AVO(ValueObject): a = Attr(type=int) b = Attr(type=str)
class AnotherVO(ValueObject): a = Attr() b = Attr(default=None) c = Attr()
class AnotherVO(ValueObject): a = Attr() b = Attr()
class AVO(ValueObject): a = Attr(type=numbers.Real, validator=lambda instance, value: 0 < value < 100)
class AnotherVO(ValueObject): a = Attr() b = Attr(hash=False)
class AVO(ValueObject): a = Attr() b = Attr(allow_none=True) c: int = Attr(allow_none=True) d: tuple = Attr(allow_none=True, default=tuple)
class AVO(ValueObject): a = Attr(type=int, default='s')
class ChildVO(MotherVO, FatherVO): g = Attr() h = Attr()
class AnotherVO(ValueObject): x = Attr()
class AVO(ValueObject): a = Attr() b: str = Attr() c: int = 1
class AVO(ValueObject): a = Attr() b = Attr()
class AVO(ValueObject): a = Attr(default=5) b = Attr()
class GrandmaVO(ValueObject): a = Attr() b = Attr()
class Tag(Entity): id: TagId = Attr() name: str = Attr()
class FatherVO(GrandmaVO): c = Attr() d = Attr()
class Author(ValueObject): id: int = Attr() name: str = Attr()
class Id(ValueObject): value: int = Attr() @classmethod def next(cls): return cls(services.generate_unique_id())