class ConcreteEntity(Entity):
     id: str = ffd.id_()
     strings: str = ffd.list_()
     now: datetime = ffd.now()
     today: date = ffd.today()
     required_field: str = ffd.required()
     dictionary: dict = ffd.dict_()
     list_of_ints: List[int] = ffd.list_()
     widget: Widget = ffd.optional()
Exemplo n.º 2
0
class Column(ffd.ValueObject):
    name: str = ffd.required()
    type: str = ffd.required()
    length: int = ffd.optional()
    is_id: bool = ffd.optional(default=False)
    is_indexed: bool = ffd.optional(default=False)
    is_required: bool = ffd.optional(default=False)
    default: any = ffd.optional()

    @property
    def string_type(self):
        return str(self.type.__name__)

    def index(self):
        return self.is_id or (self.is_indexed and self.type is str)

    def __eq__(self, other):
        return self.name == other.name
 class Widget(ffd.ValueObject):
     name: str = ffd.required()
Exemplo n.º 4
0
 class ConcreteEntity(Entity):
     id: str = ffd.id_()
     strings: str = ffd.list_()
     now: datetime = ffd.now()
     today: date = ffd.today()
     required_field: str = ffd.required()
class ThisCommand(ffd.Command):
    x: str = ffd.required()
    y: int = ffd.optional(default=0)