MCPcopy Create free account
hub / github.com/chinobing/FastAPI-PaddleSpeech-Audio-To-Text / Data

Class Data

pstext/models.py:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27class Data(Base):
28 __tablename__ = 'data'
29
30 id = Column(Integer, primary_key=True, index=True, autoincrement=True)
31 audio_id = Column(Integer, ForeignKey('audio.id'), comment='音频文件') # ForeignKey里的字符串格式不是类名.属性名,而是表名.字段名
32 audio = relationship('Audio', back_populates='data') # 'Audio'是关联的类名;back_populates来指定反向访问的属性名称
33
34 segment_title = Column(String(200), comment='segment后的音频名称')
35 segment_content = Column(Text, comment='segment后的音频内容')
36 complete = Column(Boolean, default=False, comment='segment状态')
37
38 def __repr__(self):
39 return f'{repr(self.audio_title)}'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected