parent
a45fb3992e
commit
4f6aa01202
|
@ -0,0 +1,31 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Classes description #
|
||||||
|
#######################
|
||||||
|
|
||||||
|
from collections.abc import Iterable
|
||||||
|
from pydantic import BaseModel as BM
|
||||||
|
|
||||||
|
|
||||||
|
class Book(BM):
|
||||||
|
"""
|
||||||
|
Book model class
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, name: str, hashkey: str) -> None:
|
||||||
|
"""
|
||||||
|
:param name: Book title
|
||||||
|
:param hashkey: Book file hash
|
||||||
|
"""
|
||||||
|
self.name = name
|
||||||
|
self.hashkey = hashkey
|
||||||
|
|
||||||
|
name: str
|
||||||
|
hashkey: str
|
||||||
|
author: str | None = None
|
||||||
|
description: str | None = None
|
||||||
|
mark: float | None = None
|
||||||
|
read_flag: bool = False
|
||||||
|
tags: Iterable = ()
|
||||||
|
genres: Iterable = ()
|
Loading…
Reference in New Issue