Buckets:

download
raw
2.59 kB
from __future__ import annotations
from datetime import datetime, date, time
from decimal import Decimal
from typing import Any, Optional, List, ClassVar
import sqlalchemy as sa
from sqlalchemy import ForeignKey, UniqueConstraint, text
from sqlalchemy.orm import Mapped, mapped_column, relationship
from OSSS.db.base import Base, UUIDMixin, GUID, JSONB
class Assignment(UUIDMixin, Base):
__tablename__ = "assignments"
__allow_unmapped__ = True # keep NOTE out of the SQLAlchemy mapper
NOTE: ClassVar[str] = (
"owner=division_of_teaching_learning_accountability; "
"description=Stores assignments records for the application. "
"Key attributes include name. "
"References related entities via: category, section. "
"Includes standard audit timestamps (created_at, updated_at). "
"8 column(s) defined. "
"Primary key is `id`. "
"2 foreign key field(s) detected."
)
__table_args__ = {
"comment": (
"Stores assignments records for the application. "
"Key attributes include name. "
"References related entities via: category, section. "
"Includes standard audit timestamps (created_at, updated_at). "
"8 column(s) defined. "
"Primary key is `id`. "
"2 foreign key field(s) detected."
),
"info": {
"note": NOTE,
"description": (
"Stores assignments records for the application. "
"Key attributes include name. "
"References related entities via: category, section. "
"Includes standard audit timestamps (created_at, updated_at). "
"8 column(s) defined. "
"Primary key is `id`. "
"2 foreign key field(s) detected."
),
},
}
section_id: Mapped[Any] = mapped_column(GUID(), ForeignKey("course_sections.id", ondelete="CASCADE"), nullable=False)
category_id: Mapped[Optional[Any]] = mapped_column(GUID(), ForeignKey("assignment_categories.id", ondelete="SET NULL"))
name: Mapped[str] = mapped_column(sa.Text, nullable=False)
due_date: Mapped[Optional[date]] = mapped_column(sa.Date)
points_possible: Mapped[Optional[Decimal]] = mapped_column(sa.Numeric(8, 2))
created_at: Mapped[datetime] = mapped_column(sa.DateTime(timezone=True), server_default=sa.func.now(), nullable=False)
updated_at: Mapped[datetime] = mapped_column(sa.DateTime(timezone=True), server_default=sa.func.now(), onupdate=sa.func.now(), nullable=False)

Xet Storage Details

Size:
2.59 kB
·
Xet hash:
b13f98a211a6a504d371a07214e94cf7fcb37b8e7fcaa0e91292c2620815dd27

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.