fix comments
This commit is contained in:
parent
0fd26dc708
commit
178ac334a0
@ -9,21 +9,33 @@ class DownloadHistory(Base):
|
|||||||
下载历史记录
|
下载历史记录
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 保存路径
|
||||||
path = Column(String, nullable=False, index=True)
|
path = Column(String, nullable=False, index=True)
|
||||||
|
# 类型 电影/电视剧
|
||||||
type = Column(String, nullable=False)
|
type = Column(String, nullable=False)
|
||||||
|
# 标题
|
||||||
title = Column(String, nullable=False)
|
title = Column(String, nullable=False)
|
||||||
|
# 年份
|
||||||
year = Column(String)
|
year = Column(String)
|
||||||
tmdbid = Column(Integer, index=True)
|
tmdbid = Column(Integer, index=True)
|
||||||
imdbid = Column(String)
|
imdbid = Column(String)
|
||||||
tvdbid = Column(Integer)
|
tvdbid = Column(Integer)
|
||||||
doubanid = Column(String)
|
doubanid = Column(String)
|
||||||
|
# Sxx
|
||||||
seasons = Column(Integer)
|
seasons = Column(Integer)
|
||||||
|
# Exx
|
||||||
episodes = Column(String)
|
episodes = Column(String)
|
||||||
|
# 海报
|
||||||
image = Column(String)
|
image = Column(String)
|
||||||
|
# 下载任务Hash
|
||||||
download_hash = Column(String, index=True)
|
download_hash = Column(String, index=True)
|
||||||
|
# 种子名称
|
||||||
torrent_name = Column(String)
|
torrent_name = Column(String)
|
||||||
|
# 种子描述
|
||||||
torrent_description = Column(String)
|
torrent_description = Column(String)
|
||||||
|
# 种子站点
|
||||||
torrent_site = Column(String)
|
torrent_site = Column(String)
|
||||||
|
# 附加信息
|
||||||
note = Column(String)
|
note = Column(String)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -11,21 +11,37 @@ class Site(Base):
|
|||||||
站点表
|
站点表
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 站点名
|
||||||
name = Column(String, nullable=False)
|
name = Column(String, nullable=False)
|
||||||
|
# 域名Key
|
||||||
domain = Column(String, index=True)
|
domain = Column(String, index=True)
|
||||||
|
# 站点地址
|
||||||
url = Column(String, nullable=False)
|
url = Column(String, nullable=False)
|
||||||
|
# 站点优先级
|
||||||
pri = Column(Integer)
|
pri = Column(Integer)
|
||||||
|
# RSS地址,未启用
|
||||||
rss = Column(String)
|
rss = Column(String)
|
||||||
|
# Cookie
|
||||||
cookie = Column(String)
|
cookie = Column(String)
|
||||||
|
# User-Agent
|
||||||
ua = Column(String)
|
ua = Column(String)
|
||||||
|
# 是否使用代理 0-否,1-是
|
||||||
proxy = Column(Integer)
|
proxy = Column(Integer)
|
||||||
|
# 过滤规则
|
||||||
filter = Column(String)
|
filter = Column(String)
|
||||||
|
# 是否渲染
|
||||||
render = Column(Integer)
|
render = Column(Integer)
|
||||||
|
# 附加信息
|
||||||
note = Column(String)
|
note = Column(String)
|
||||||
|
# 流控单位周期
|
||||||
limit_interval = Column(Integer, default=0)
|
limit_interval = Column(Integer, default=0)
|
||||||
|
# 流控次数
|
||||||
limit_count = Column(Integer, default=0)
|
limit_count = Column(Integer, default=0)
|
||||||
|
# 流控间隔
|
||||||
limit_seconds = Column(Integer, default=0)
|
limit_seconds = Column(Integer, default=0)
|
||||||
|
# 是否启用
|
||||||
is_active = Column(Boolean(), default=True)
|
is_active = Column(Boolean(), default=True)
|
||||||
|
# 创建时间
|
||||||
lst_mod_date = Column(String, default=datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
lst_mod_date = Column(String, default=datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -9,9 +9,13 @@ class SiteIcon(Base):
|
|||||||
站点图标表
|
站点图标表
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 站点名称
|
||||||
name = Column(String, nullable=False)
|
name = Column(String, nullable=False)
|
||||||
|
# 域名Key
|
||||||
domain = Column(String, index=True)
|
domain = Column(String, index=True)
|
||||||
|
# 图标地址
|
||||||
url = Column(String, nullable=False)
|
url = Column(String, nullable=False)
|
||||||
|
# 图标Base64
|
||||||
base64 = Column(String)
|
base64 = Column(String)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -9,24 +9,39 @@ class Subscribe(Base):
|
|||||||
订阅表
|
订阅表
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 标题
|
||||||
name = Column(String, nullable=False, index=True)
|
name = Column(String, nullable=False, index=True)
|
||||||
|
# 年份
|
||||||
year = Column(String)
|
year = Column(String)
|
||||||
|
# 类型
|
||||||
type = Column(String)
|
type = Column(String)
|
||||||
|
# 搜索关键字
|
||||||
keyword = Column(String)
|
keyword = Column(String)
|
||||||
tmdbid = Column(Integer, index=True)
|
tmdbid = Column(Integer, index=True)
|
||||||
imdbid = Column(String)
|
imdbid = Column(String)
|
||||||
tvdbid = Column(Integer, index=True)
|
tvdbid = Column(Integer, index=True)
|
||||||
doubanid = Column(String)
|
doubanid = Column(String)
|
||||||
|
# 季号
|
||||||
season = Column(Integer)
|
season = Column(Integer)
|
||||||
|
# 海报
|
||||||
image = Column(String)
|
image = Column(String)
|
||||||
|
# 简介
|
||||||
description = Column(String)
|
description = Column(String)
|
||||||
|
# 过滤规则
|
||||||
filter = Column(String)
|
filter = Column(String)
|
||||||
|
# 包含
|
||||||
include = Column(String)
|
include = Column(String)
|
||||||
|
# 排除
|
||||||
exclude = Column(String)
|
exclude = Column(String)
|
||||||
|
# 总集数
|
||||||
total_episode = Column(Integer)
|
total_episode = Column(Integer)
|
||||||
|
# 开始集数
|
||||||
start_episode = Column(Integer)
|
start_episode = Column(Integer)
|
||||||
|
# 缺失集数
|
||||||
lack_episode = Column(Integer)
|
lack_episode = Column(Integer)
|
||||||
|
# 附加信息
|
||||||
note = Column(String)
|
note = Column(String)
|
||||||
|
# 状态:N-新建, R-订阅中
|
||||||
state = Column(String, nullable=False, index=True, default='N')
|
state = Column(String, nullable=False, index=True, default='N')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -9,7 +9,9 @@ class SystemConfig(Base):
|
|||||||
配置表
|
配置表
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 主键
|
||||||
key = Column(String, index=True)
|
key = Column(String, index=True)
|
||||||
|
# 值
|
||||||
value = Column(String, nullable=True)
|
value = Column(String, nullable=True)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, String, Sequence
|
from sqlalchemy import Column, Integer, String, Sequence, Boolean
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from app.db.models import Base
|
from app.db.models import Base
|
||||||
@ -11,21 +11,37 @@ class TransferHistory(Base):
|
|||||||
转移历史记录
|
转移历史记录
|
||||||
"""
|
"""
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 源目录
|
||||||
src = Column(String, index=True)
|
src = Column(String, index=True)
|
||||||
|
# 目标目录
|
||||||
dest = Column(String)
|
dest = Column(String)
|
||||||
|
# 转移模式 move/copy/link...
|
||||||
mode = Column(String)
|
mode = Column(String)
|
||||||
|
# 类型 电影/电视剧
|
||||||
type = Column(String)
|
type = Column(String)
|
||||||
|
# 二级分类
|
||||||
category = Column(String)
|
category = Column(String)
|
||||||
|
# 标题
|
||||||
title = Column(String, index=True)
|
title = Column(String, index=True)
|
||||||
|
# 年份
|
||||||
year = Column(String)
|
year = Column(String)
|
||||||
tmdbid = Column(Integer)
|
tmdbid = Column(Integer)
|
||||||
imdbid = Column(String)
|
imdbid = Column(String)
|
||||||
tvdbid = Column(Integer)
|
tvdbid = Column(Integer)
|
||||||
doubanid = Column(String)
|
doubanid = Column(String)
|
||||||
|
# Sxx
|
||||||
seasons = Column(Integer)
|
seasons = Column(Integer)
|
||||||
|
# Exx
|
||||||
episodes = Column(String)
|
episodes = Column(String)
|
||||||
|
# 海报
|
||||||
image = Column(String)
|
image = Column(String)
|
||||||
|
# 下载器hash
|
||||||
download_hash = Column(String)
|
download_hash = Column(String)
|
||||||
|
# 转移成功状态
|
||||||
|
status = Column(Boolean(), default=True)
|
||||||
|
# 转移失败信息
|
||||||
|
errmsg = Column(String)
|
||||||
|
# 时间
|
||||||
date = Column(String, index=True, default=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
date = Column(String, index=True, default=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -9,12 +9,19 @@ class User(Base):
|
|||||||
"""
|
"""
|
||||||
用户表
|
用户表
|
||||||
"""
|
"""
|
||||||
|
# ID
|
||||||
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
|
||||||
|
# 用户名
|
||||||
name = Column(String, index=True, nullable=False)
|
name = Column(String, index=True, nullable=False)
|
||||||
|
# 邮箱,未启用
|
||||||
email = Column(String, unique=True, index=True)
|
email = Column(String, unique=True, index=True)
|
||||||
|
# 加密后密码
|
||||||
hashed_password = Column(String, nullable=False)
|
hashed_password = Column(String, nullable=False)
|
||||||
|
# 是否启用
|
||||||
is_active = Column(Boolean(), default=True)
|
is_active = Column(Boolean(), default=True)
|
||||||
|
# 是否管理员
|
||||||
is_superuser = Column(Boolean(), default=False)
|
is_superuser = Column(Boolean(), default=False)
|
||||||
|
# 头像
|
||||||
avatar = Column(String)
|
avatar = Column(String)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -4,22 +4,39 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
|
|
||||||
class DownloadHistory(BaseModel):
|
class DownloadHistory(BaseModel):
|
||||||
|
# ID
|
||||||
id: int
|
id: int
|
||||||
|
# 保存路程
|
||||||
path: Optional[str] = None
|
path: Optional[str] = None
|
||||||
|
# 类型:电影、电视剧
|
||||||
type: Optional[str] = None
|
type: Optional[str] = None
|
||||||
|
# 标题
|
||||||
title: Optional[str] = None
|
title: Optional[str] = None
|
||||||
|
# 年份
|
||||||
year: Optional[str] = None
|
year: Optional[str] = None
|
||||||
|
# TMDBID
|
||||||
tmdbid: Optional[int] = None
|
tmdbid: Optional[int] = None
|
||||||
|
# IMDBID
|
||||||
imdbid: Optional[str] = None
|
imdbid: Optional[str] = None
|
||||||
|
# TVDBID
|
||||||
tvdbid: Optional[int] = None
|
tvdbid: Optional[int] = None
|
||||||
|
# 豆瓣ID
|
||||||
doubanid: Optional[str] = None
|
doubanid: Optional[str] = None
|
||||||
|
# 季Sxx
|
||||||
seasons: Optional[str] = None
|
seasons: Optional[str] = None
|
||||||
|
# 集Exx
|
||||||
episodes: Optional[str] = None
|
episodes: Optional[str] = None
|
||||||
|
# 海报
|
||||||
image: Optional[str] = None
|
image: Optional[str] = None
|
||||||
|
# 下载器Hash
|
||||||
download_hash: Optional[str] = None
|
download_hash: Optional[str] = None
|
||||||
|
# 种子名称
|
||||||
torrent_name: Optional[str] = None
|
torrent_name: Optional[str] = None
|
||||||
|
# 种子描述
|
||||||
torrent_description: Optional[str] = None
|
torrent_description: Optional[str] = None
|
||||||
|
# 站点
|
||||||
torrent_site: Optional[str] = None
|
torrent_site: Optional[str] = None
|
||||||
|
# 备注
|
||||||
note: Optional[str] = None
|
note: Optional[str] = None
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
@ -27,22 +44,43 @@ class DownloadHistory(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class TransferHistory(BaseModel):
|
class TransferHistory(BaseModel):
|
||||||
|
# ID
|
||||||
id: int
|
id: int
|
||||||
|
# 源目录
|
||||||
src: Optional[str] = None
|
src: Optional[str] = None
|
||||||
|
# 目的目录
|
||||||
dest: Optional[str] = None
|
dest: Optional[str] = None
|
||||||
|
# 转移模式link/copy/move/softlink
|
||||||
mode: Optional[str] = None
|
mode: Optional[str] = None
|
||||||
|
# 类型:电影、电视剧
|
||||||
type: Optional[str] = None
|
type: Optional[str] = None
|
||||||
|
# 二级分类
|
||||||
category: Optional[str] = None
|
category: Optional[str] = None
|
||||||
|
# 标题
|
||||||
title: Optional[str] = None
|
title: Optional[str] = None
|
||||||
|
# 年份
|
||||||
year: Optional[str] = None
|
year: Optional[str] = None
|
||||||
|
# TMDBID
|
||||||
tmdbid: Optional[int] = None
|
tmdbid: Optional[int] = None
|
||||||
|
# IMDBID
|
||||||
imdbid: Optional[str] = None
|
imdbid: Optional[str] = None
|
||||||
|
# TVDBID
|
||||||
tvdbid: Optional[int] = None
|
tvdbid: Optional[int] = None
|
||||||
|
# 豆瓣ID
|
||||||
doubanid: Optional[str] = None
|
doubanid: Optional[str] = None
|
||||||
|
# 季Sxx
|
||||||
seasons: Optional[str] = None
|
seasons: Optional[str] = None
|
||||||
|
# 集Exx
|
||||||
episodes: Optional[str] = None
|
episodes: Optional[str] = None
|
||||||
|
# 海报
|
||||||
image: Optional[str] = None
|
image: Optional[str] = None
|
||||||
|
# 下载器Hash
|
||||||
download_hash: Optional[str] = None
|
download_hash: Optional[str] = None
|
||||||
|
# 状态 1-成功,0-失败
|
||||||
|
status: bool = True
|
||||||
|
# 失败原因
|
||||||
|
errmsg: Optional[str] = None
|
||||||
|
# 日期
|
||||||
date: Optional[str] = None
|
date: Optional[str] = None
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -4,6 +4,9 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
|
|
||||||
class Response(BaseModel):
|
class Response(BaseModel):
|
||||||
|
# 状态
|
||||||
success: bool
|
success: bool
|
||||||
|
# 消息文本
|
||||||
message: Optional[str] = None
|
message: Optional[str] = None
|
||||||
|
# 数据
|
||||||
data: Optional[dict] = {}
|
data: Optional[dict] = {}
|
||||||
|
@ -4,21 +4,37 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
|
|
||||||
class Site(BaseModel):
|
class Site(BaseModel):
|
||||||
|
# ID
|
||||||
id: int
|
id: int
|
||||||
|
# 站点名称
|
||||||
name: str
|
name: str
|
||||||
|
# 站点主域名Key
|
||||||
domain: str
|
domain: str
|
||||||
|
# 站点地址
|
||||||
url: str
|
url: str
|
||||||
|
# 站点优先级
|
||||||
pri: Optional[int] = 0
|
pri: Optional[int] = 0
|
||||||
|
# RSS地址
|
||||||
rss: Optional[str] = None
|
rss: Optional[str] = None
|
||||||
|
# Cookie
|
||||||
cookie: Optional[str] = None
|
cookie: Optional[str] = None
|
||||||
|
# User-Agent
|
||||||
ua: Optional[str] = None
|
ua: Optional[str] = None
|
||||||
|
# 是否使用代理
|
||||||
proxy: Optional[int] = 0
|
proxy: Optional[int] = 0
|
||||||
|
# 过滤规则
|
||||||
filter: Optional[str] = None
|
filter: Optional[str] = None
|
||||||
|
# 是否演染
|
||||||
render: Optional[int] = 0
|
render: Optional[int] = 0
|
||||||
|
# 备注
|
||||||
note: Optional[str] = None
|
note: Optional[str] = None
|
||||||
|
# 流控单位周期
|
||||||
limit_interval: Optional[int] = 0
|
limit_interval: Optional[int] = 0
|
||||||
|
# 流控次数
|
||||||
limit_count: Optional[int] = 0
|
limit_count: Optional[int] = 0
|
||||||
|
# 流控间隔
|
||||||
limit_seconds: Optional[int] = 0
|
limit_seconds: Optional[int] = 0
|
||||||
|
# 是否启用
|
||||||
is_active: Optional[bool] = True
|
is_active: Optional[bool] = True
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -5,22 +5,37 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
class Subscribe(BaseModel):
|
class Subscribe(BaseModel):
|
||||||
id: int
|
id: int
|
||||||
|
# 订阅名称
|
||||||
name: str
|
name: str
|
||||||
|
# 订阅年份
|
||||||
year: str
|
year: str
|
||||||
|
# 订阅类型 电影/电视剧
|
||||||
type: str
|
type: str
|
||||||
|
# 搜索关键字
|
||||||
keyword: Optional[str]
|
keyword: Optional[str]
|
||||||
tmdbid: int
|
tmdbid: int
|
||||||
doubanid: Optional[str]
|
doubanid: Optional[str]
|
||||||
|
# 季号
|
||||||
season: Optional[int]
|
season: Optional[int]
|
||||||
|
# 海报
|
||||||
image: Optional[str]
|
image: Optional[str]
|
||||||
|
# 描述
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
|
# 过滤规则
|
||||||
filter: Optional[str]
|
filter: Optional[str]
|
||||||
|
# 包含
|
||||||
include: Optional[str]
|
include: Optional[str]
|
||||||
|
# 排除
|
||||||
exclude: Optional[str]
|
exclude: Optional[str]
|
||||||
|
# 总集数
|
||||||
total_episode: Optional[int]
|
total_episode: Optional[int]
|
||||||
|
# 开始集数
|
||||||
start_episode: Optional[int]
|
start_episode: Optional[int]
|
||||||
|
# 缺失集数
|
||||||
lack_episode: Optional[int]
|
lack_episode: Optional[int]
|
||||||
|
# 附加信息
|
||||||
note: Optional[str]
|
note: Optional[str]
|
||||||
|
# 状态:N-新建, R-订阅中
|
||||||
state: str
|
state: str
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -9,4 +9,5 @@ class Token(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class TokenPayload(BaseModel):
|
class TokenPayload(BaseModel):
|
||||||
|
# 用户ID
|
||||||
sub: Optional[int] = None
|
sub: Optional[int] = None
|
||||||
|
@ -5,10 +5,15 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
# Shared properties
|
# Shared properties
|
||||||
class UserBase(BaseModel):
|
class UserBase(BaseModel):
|
||||||
|
# 用户名
|
||||||
name: str
|
name: str
|
||||||
|
# 邮箱,未启用
|
||||||
email: Optional[str] = None
|
email: Optional[str] = None
|
||||||
|
# 状态
|
||||||
is_active: Optional[bool] = True
|
is_active: Optional[bool] = True
|
||||||
|
# 超级管理员
|
||||||
is_superuser: bool = False
|
is_superuser: bool = False
|
||||||
|
# 头像
|
||||||
avatar: Optional[str] = None
|
avatar: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user