Files
kurious/internal/kurious/domain/course.go
2024-01-08 18:31:35 +03:00

48 lines
1.0 KiB
Go

package domain
import (
"time"
"git.loyso.art/frx/kurious/internal/common/nullable"
)
// Course is a main entity of this project.
type Course struct {
// ID is our unique identifier
ID string
// ExternalID if exists
ExternalID nullable.Value[string]
SourceType SourceType
SourceName nullable.Value[string]
// OrganizationID that provides course.
OrganizationID string
// Link to the course
OriginLink string
ImageLink string
Name string
// Description of the course. Might be html encoded value.
// Maybe it's worth to add flag about it.
Description string
// FullPrice is a course full price without discount.
FullPrice float64
// Discount for the course.
Discount float64
Thematic string
ThematicID string
LearningType string
LearningTypeID string
// Duration for the course. It will be splitted in values like:
// full month / full day / full hour.
Duration time.Duration
// StartsAt points to time when the course will start.
StartsAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt nullable.Value[time.Time]
}