Remove Programs tab and all supporting code
The Programs feature is superseded by Shows, which provides a more flexible model with schedule slots. This commit removes all Programs code across frontend and backend: Frontend: - Delete admin-program-form component (ts/html/scss) - Delete program.service.ts and program.ts interface - Remove Programs tab, form modal, and all CRUD logic from admin component (ts + html) Backend: - Delete programs API router - Remove Program ORM model and ProgramCreate/Update/Response schemas - Remove programs router registration from main.py - Remove Program from seed data, seed helpers, and truncate/reset
This commit is contained in:
+1
-35
@@ -4,7 +4,7 @@ from typing import Optional
|
||||
from pydantic import BaseModel, computed_field, field_validator
|
||||
|
||||
|
||||
# ── Program ──────────────────────────────────────────────
|
||||
# ── Shared ───────────────────────────────────────────────
|
||||
|
||||
DAY_NAMES = {
|
||||
1: "Monday",
|
||||
@@ -17,40 +17,6 @@ DAY_NAMES = {
|
||||
}
|
||||
|
||||
|
||||
class ProgramCreate(BaseModel):
|
||||
day_of_week: int
|
||||
day_label: str
|
||||
time: str
|
||||
title: str
|
||||
host: str
|
||||
genre: str
|
||||
|
||||
|
||||
class ProgramUpdate(BaseModel):
|
||||
day_of_week: Optional[int] = None
|
||||
day_label: Optional[str] = None
|
||||
time: Optional[str] = None
|
||||
title: Optional[str] = None
|
||||
host: Optional[str] = None
|
||||
genre: Optional[str] = None
|
||||
|
||||
|
||||
class ProgramResponse(BaseModel):
|
||||
id: int
|
||||
day_of_week: int
|
||||
time: str
|
||||
title: str
|
||||
host: str
|
||||
genre: str
|
||||
|
||||
@computed_field
|
||||
@property
|
||||
def day_label(self) -> str:
|
||||
return DAY_NAMES.get(self.day_of_week, "Unknown")
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
# ── Event ────────────────────────────────────────────────
|
||||
|
||||
class EventCreate(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user