28 lines
911 B
Go
28 lines
911 B
Go
package domain
|
||
|
||
import "time"
|
||
|
||
// Module belongs to a Course. program_id is the course’s program (stored for querying; not required from the client on create).
|
||
type Module struct {
|
||
ID int64 `json:"id"`
|
||
ProgramID int64 `json:"program_id"`
|
||
CourseID int64 `json:"course_id"`
|
||
Name string `json:"name"`
|
||
Description *string `json:"description,omitempty"`
|
||
Icon *string `json:"icon,omitempty"`
|
||
CreatedAt time.Time `json:"created_at"`
|
||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||
}
|
||
|
||
type CreateModuleInput struct {
|
||
Name string `json:"name" validate:"required"`
|
||
Description *string `json:"description,omitempty"`
|
||
Icon *string `json:"icon,omitempty"`
|
||
}
|
||
|
||
type UpdateModuleInput struct {
|
||
Name *string `json:"name,omitempty"`
|
||
Description *string `json:"description,omitempty"`
|
||
Icon *string `json:"icon,omitempty"`
|
||
}
|