Rename duration to wait_duration to make it clear what the duration means
The wait_duration means how long after the previous entry was released that you have to wait for the next one.
This commit is contained in:
parent
bf08335382
commit
94c03cad1f
2 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ class PublicationSequenceModel(Base):
|
||||||
position: Mapped[int] = mapped_column()
|
position: Mapped[int] = mapped_column()
|
||||||
entry_id: Mapped[int] = mapped_column(ForeignKey('publication_entry.id'))
|
entry_id: Mapped[int] = mapped_column(ForeignKey('publication_entry.id'))
|
||||||
order_id: Mapped[int] = mapped_column(ForeignKey('publication_order.id'))
|
order_id: Mapped[int] = mapped_column(ForeignKey('publication_order.id'))
|
||||||
duration: Mapped[timedelta | None] = mapped_column(Interval())
|
wait_duration: Mapped[timedelta | None] = mapped_column(Interval())
|
||||||
|
|
||||||
__table_args__ = (
|
__table_args__ = (
|
||||||
UniqueConstraint('order_id', 'entry_id'),
|
UniqueConstraint('order_id', 'entry_id'),
|
||||||
|
|
@ -71,7 +71,7 @@ def model_to_sequence(db_pub_position: PublicationSequenceModel) -> Sequence:
|
||||||
return Sequence(
|
return Sequence(
|
||||||
position=db_pub_position.position,
|
position=db_pub_position.position,
|
||||||
entry=model_to_entry(db_pub_position.entry).to_profile(),
|
entry=model_to_entry(db_pub_position.entry).to_profile(),
|
||||||
duration=db_pub_position.duration,
|
wait_duration=db_pub_position.wait_duration,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Entry:
|
||||||
class Sequence:
|
class Sequence:
|
||||||
position: int
|
position: int
|
||||||
entry: EntryProfile
|
entry: EntryProfile
|
||||||
duration: timedelta | None
|
wait_duration: timedelta | None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue