initial commit

This commit is contained in:
m.zare
2026-04-10 18:25:21 +03:30
commit 77ca6c34a3
263 changed files with 34470 additions and 0 deletions

View 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
}

View 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
}

View 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
}

View 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
}

View 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
}

View 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
}

View 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
}

View 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
}

View 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"`
}

View 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
}

View 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
}