Migrate ClassSchedule and Course schemas to Go; with valida…#2
Merged
Conversation
…tion and regex checks.
Member
Author
|
Need help for naming convention. |
NaoCoding
approved these changes
Sep 15, 2025
Contributor
NaoCoding
left a comment
There was a problem hiding this comment.
For the schema part, I think there's no any issues.
However, I would prefer modifying the readme.md for telling the developers about how to setup the backend. (This can also be done after you write a new Golang backend).
- Deleted main application file (src/app.ts) along with its middleware and routes. - Removed environment configuration file (src/config/env.ts) that handled environment variables. - Eliminated Firebase configuration file (src/config/firebase.ts) and its initialization logic. - Removed server entry point (src/index.ts) that started the Express server. - Deleted API tests (src/test/api.test.ts) and configuration tests (src/test/config.test.ts). - Removed test setup file (src/test/setup.ts) for initializing test environment. - Deleted TypeScript configuration file (tsconfig.json) and Vitest configuration file (vitest.config.ts).
… and enhance code quality checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request migrates the schema definitions for
ClassScheduleandCoursefrom TypeScript (.ts) files using Zod validation to Go (.go) files using Go types and struct tags. The new Go implementations introduce explicit type definitions, validation rules, and some additional helper logic for time format validation. The TypeScript schemas and related utility code are removed.Schema migration from TypeScript to Go:
ClassScheduleschema in Go (ClassSchedule.go), defining the structure, validation rules, and visibility options as Go types and constants.Courseschema in Go (Course.go), including detailed field validation via struct tags, explicit course categories, and a helper function to validate time formats forCourseTime.Removal of TypeScript schema definitions and utilities:
ClassSchedule, including therouteutility and type exports inClassSchedule.ts.Course, including therouteutility and type exports inCourse.ts.