You've already forked my-video-workflow
初次提交
This commit is contained in:
20
model/DanmakuClip.py
Normal file
20
model/DanmakuClip.py
Normal file
@ -0,0 +1,20 @@
|
||||
from . import db
|
||||
|
||||
|
||||
class DanmakuClip(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
base_path = db.Column(db.String(255))
|
||||
file = db.Column(db.String(255))
|
||||
subtitle_file = db.Column(db.String(255))
|
||||
offset = db.Column(db.Float, nullable=False, default=0)
|
||||
workflow_id = db.Column(db.Integer, db.ForeignKey('workflow.id'))
|
||||
workflow = db.relationship("Workflow", backref=db.backref("danmaku_clips", lazy="dynamic"))
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
"base_path": self.base_path,
|
||||
"file": self.file,
|
||||
"subtitle_file": self.subtitle_file,
|
||||
"offset": self.offset,
|
||||
}
|
Reference in New Issue
Block a user