Exemplo n.º 1
0
class PLUser:
    id: str = types.readonly.str.primary.mongoid.required
    name: str
    articles: Annotated[list[PLArticle], linkedby('author')]
    created_at: datetime = types.readonly.datetime.tscreated.required
    updated_at: datetime = types.readonly.datetime.tsupdated.required
Exemplo n.º 2
0
class LinkedAuthor:
    name: str
    articles: Annotated[list[LinkedArticle], linkedby('author')]
Exemplo n.º 3
0
class LinkedStrIdSinger:
    id: str = types.str.primary.required
    songs: Annotated[list[LinkedStrIdSong], linkedby('singers')]
Exemplo n.º 4
0
class LinkedUser:
    name: str
    profile: Annotated[LinkedProfile, linkedby('user')]
Exemplo n.º 5
0
class LinkedStrIdAuthor:
    id: str = types.str.primary.required
    val: str
    articles: Annotated[list[LinkedStrIdArticle], linkedby('author')]