Complete recurrence editing and calendar preferences
This commit is contained in:
@@ -94,6 +94,36 @@ class CalendarEvent(Base, TimestampMixin):
|
||||
calendar: Mapped[CalendarCollection] = relationship(back_populates="events")
|
||||
|
||||
|
||||
class CalendarViewPreference(Base, TimestampMixin):
|
||||
__tablename__ = "calendar_view_preferences"
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"tenant_id",
|
||||
"user_id",
|
||||
name="uq_calendar_view_preferences_tenant_user",
|
||||
),
|
||||
)
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=new_uuid)
|
||||
tenant_id: Mapped[str] = mapped_column(
|
||||
String(36),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
user_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("access_users.id", ondelete="CASCADE"),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
dim_weekends: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
dim_off_hours: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
workday_start_hour: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
workday_end_hour: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
continuous_virtualization: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
continuous_overscan_weeks: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
alternate_continuous_months: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
|
||||
|
||||
class CalendarSyncSource(Base, TimestampMixin):
|
||||
__tablename__ = "calendar_sync_sources"
|
||||
__table_args__ = (
|
||||
@@ -215,5 +245,6 @@ __all__ = [
|
||||
"CalendarOutboxOperation",
|
||||
"CalendarSyncCredential",
|
||||
"CalendarSyncSource",
|
||||
"CalendarViewPreference",
|
||||
"new_uuid",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user