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.

94 lines
1.4 KiB
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):
id: int
class ArtistNoId(BaseModel):
name: 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 TagCategorynoID(BaseModel):
name: str
class Config:
orm_mode = True
class TagCategory(TagCategorynoID):
category_id: int
class Config:
orm_mode = True
class TagNoID(BaseModel):
name: Optional[str]
description: Optional[str]
category_id: Optional[int]
implications: Optional[List[int]]
aliases: Optional[List[int]]
class Config:
orm_mode = True
class Tag(TagNoID):
tag_id: int
class Config:
orm_mode = True
class ArtnoID(BaseModel):
hash: Optional[str]
path: Optional[str]
title: Optional[str] = None
link: Optional[str] = None
description: Optional[str]
presences: Optional[List[Presence]]
tags: Optional[List[Tag]]
class Config:
orm_mode = True
class Art(ArtnoID):
id: int
class Config:
orm_mode = True