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.

59 lines
899 B
Python

from pydantic import BaseModel
from typing import List, Optional
class TopicNoId(BaseModel):
name: str
description: Optional[str]
class Config:
orm_mode = True
class Topic(TopicNoId):
topic_id: int
class ArtistNoId(BaseModel):
description: str
topics: Optional[List[int]]
class Config:
orm_mode = True
class Artist(ArtistNoId):
artist_id: int
class Config:
orm_mode = True
class Presence(BaseModel):
name: str
domain: str
link: Optional[str]
artist_id: Optional[int]
class Config:
orm_mode = True
class ArtnoID(BaseModel):
hash: Optional[str]
path: Optional[str]
title: Optional[str] = None
link: Optional[str] = None
presences: Optional[List[Presence]]
class Config:
orm_mode = True
class Art(ArtnoID):
id: int
class Config:
orm_mode = True