30 lines
938 B
Go
30 lines
938 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
// Lesson belongs to a Module.
|
|
type Lesson struct {
|
|
ID int64 `json:"id"`
|
|
ModuleID int64 `json:"module_id"`
|
|
Title string `json:"title"`
|
|
VideoURL *string `json:"video_url,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type CreateLessonInput struct {
|
|
Title string `json:"title" validate:"required"`
|
|
VideoURL *string `json:"video_url,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
}
|
|
|
|
type UpdateLessonInput struct {
|
|
Title *string `json:"title,omitempty"`
|
|
VideoURL *string `json:"video_url,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
}
|