initial commit
This commit is contained in:
16
internal/domain/profileold/achievement.go
Normal file
16
internal/domain/profileold/achievement.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Achievement struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Name string
|
||||
Description string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
16
internal/domain/profileold/availability_exception.go
Normal file
16
internal/domain/profileold/availability_exception.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type AvailabilityException struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Date time.Time
|
||||
Start *time.Time
|
||||
End *time.Time
|
||||
DayUnavailable bool
|
||||
}
|
||||
16
internal/domain/profileold/availability_rule.go
Normal file
16
internal/domain/profileold/availability_rule.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type AvailabilityRule struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Title string
|
||||
Weekday int // 0-6, where 0 is Sunday
|
||||
Start time.Time
|
||||
End time.Time
|
||||
}
|
||||
12
internal/domain/profileold/award.go
Normal file
12
internal/domain/profileold/award.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Award struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Name string
|
||||
Description string
|
||||
}
|
||||
22
internal/domain/profileold/booking_service.go
Normal file
22
internal/domain/profileold/booking_service.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type BookingService struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
BookingServiceTypeID uuid.UUID
|
||||
BookingServiceType BookingServiceType
|
||||
Title string
|
||||
Description string
|
||||
Duration int // in minutes
|
||||
Price int // in cents or smallest currency unit
|
||||
MaxBookingDays int
|
||||
}
|
||||
|
||||
type BookingServiceType struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
}
|
||||
12
internal/domain/profileold/certification.go
Normal file
12
internal/domain/profileold/certification.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Certification struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Name string
|
||||
Description string
|
||||
}
|
||||
18
internal/domain/profileold/education.go
Normal file
18
internal/domain/profileold/education.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Education struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
SchoolName string
|
||||
Degree string
|
||||
FieldOfStudy string
|
||||
StartDate *time.Time
|
||||
EndDate *time.Time
|
||||
Description string
|
||||
}
|
||||
17
internal/domain/profileold/experience.go
Normal file
17
internal/domain/profileold/experience.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Experience struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
CompanyName string
|
||||
Position string
|
||||
StartDate *time.Time
|
||||
EndDate *time.Time
|
||||
Description string
|
||||
}
|
||||
52
internal/domain/profileold/profile.go
Normal file
52
internal/domain/profileold/profile.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
//go:generate stringer -type=Status
|
||||
type Status int
|
||||
|
||||
const (
|
||||
StatusPublished Status = iota
|
||||
StatusDisabled
|
||||
StatusPending
|
||||
StatusDeleted
|
||||
)
|
||||
|
||||
type Profile struct {
|
||||
ID uuid.UUID
|
||||
UserID uuid.UUID
|
||||
ProfileHandle string
|
||||
Status Status
|
||||
Settings Settings
|
||||
Skills []Skill
|
||||
SocialLinks []SocialLink
|
||||
Achievements []Achievement
|
||||
Experiences []Experience
|
||||
Educations []Education
|
||||
Certifications []Certification
|
||||
Awards []Award
|
||||
AvailabilityRules []AvailabilityRule
|
||||
AvailabilityExceptions []AvailabilityException
|
||||
BookingServices []BookingService
|
||||
// Note: These are typically loaded separately to avoid circular dependencies
|
||||
// Assets, AssetBookmarkGroups, SpecialistBookmarks, PurchasedAssets, BookedServices
|
||||
// are accessed through their respective repositories using ProfileID/UserID
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
Theme ThemeSettings `json:"theme"`
|
||||
Other json.RawMessage `json:"rest_of_fields"`
|
||||
}
|
||||
|
||||
type ThemeSettings struct {
|
||||
BackgroundColor string `json:"background_color"`
|
||||
TextColor string `json:"text_color"`
|
||||
RestOfFields json.RawMessage `json:"rest_of_fields"`
|
||||
}
|
||||
22
internal/domain/profileold/skill.go
Normal file
22
internal/domain/profileold/skill.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
//go:generate stringer -type=SkillLevel
|
||||
type SkillLevel int
|
||||
|
||||
const (
|
||||
SkillLevelBeginner SkillLevel = iota
|
||||
SkillLevelIntermediate
|
||||
SkillLevelAdvanced
|
||||
SkillLevelExpert
|
||||
)
|
||||
|
||||
type Skill struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
Name string
|
||||
Level SkillLevel
|
||||
}
|
||||
12
internal/domain/profileold/social_link.go
Normal file
12
internal/domain/profileold/social_link.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package profile
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type SocialLink struct {
|
||||
ID uuid.UUID
|
||||
ProfileID uuid.UUID
|
||||
LinkType string
|
||||
Link string
|
||||
}
|
||||
Reference in New Issue
Block a user