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()
|
||||
entry_id: Mapped[int] = mapped_column(ForeignKey('publication_entry.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__ = (
|
||||
UniqueConstraint('order_id', 'entry_id'),
|
||||
|
|
@ -71,7 +71,7 @@ def model_to_sequence(db_pub_position: PublicationSequenceModel) -> Sequence:
|
|||
return Sequence(
|
||||
position=db_pub_position.position,
|
||||
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:
|
||||
position: int
|
||||
entry: EntryProfile
|
||||
duration: timedelta | None
|
||||
wait_duration: timedelta | None
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue