You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
551 B
Python
22 lines
551 B
Python
from typing import Optional
|
|
from molten import schema, field
|
|
from sqlalchemy import Column, Text, Boolean
|
|
from pulley.db import Base, DBMixin
|
|
from pulley.schema import Link
|
|
|
|
|
|
@schema
|
|
class Todo:
|
|
id: int = field(response_only=True)
|
|
createdDate: str = field(response_only=True)
|
|
modifiedDate: str = field(response_only=True)
|
|
todo: str
|
|
complete: Optional[bool]
|
|
href: Link = field(response_only=True)
|
|
|
|
|
|
class TodoModel(Base, DBMixin):
|
|
__tablename__ = "todo"
|
|
todo = Column(Text)
|
|
complete = Column(Boolean, default=False)
|