Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserCharacter ¶
type UserCharacter struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` CharacterID uuid.UUID `json:"characterId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` ExperiencePoints int `json:"experience_points" gorm:"type:int"` EquippedItems utils.NestedJSONMap `json:"equipped_items" gorm:"type:jsonb"` Stats utils.NestedJSONMap `json:"stats" gorm:"type:jsonb"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` Character models.Character `gorm:"foreignKey:CharacterID;references:ID"` }
type UserCharacterFruit ¶
type UserCharacterFruit struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` CharacterID uuid.UUID `json:"characterId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` UserCharacterId uuid.UUID `json:"userCharacterId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` FruitName string `json:"fruit_name" gorm:"type:varchar(255)"` Points int `json:"points" gorm:"type:int"` Multiplier int `json:"multiplier" gorm:"type:int"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` Character models.Character `gorm:"foreignKey:CharacterID;references:ID"` UserCharacter UserCharacter `gorm:"foreignKey:UserCharacterId;references:ID"` }
type UserCharacterFruitRepository ¶
type UserCharacterFruitRepository interface { GetMany(ctx context.Context) ([]*UserCharacterFruit, error) GetAllByUserCharacter(ctx context.Context, userId uuid.UUID, characterId uuid.UUID) ([]*UserCharacterFruit, error) GetOne(ctx context.Context, userCharacterFruitId uuid.UUID) (*UserCharacterFruit, error) CreateOne(ctx context.Context, userCharacterFruit *UserCharacterFruit) (*UserCharacterFruit, error) UpdateOne(ctx context.Context, userCharacterFruitId uuid.UUID, updateData map[string]interface{}) (*UserCharacterFruit, error) DeleteOne(ctx context.Context, userCharacterFruitId uuid.UUID) error }
type UserCharacterRepository ¶
type UserCharacterRepository interface { GetMany(ctx context.Context) ([]*UserCharacter, error) GetAllByUser(ctx context.Context, userId uuid.UUID) ([]*UserCharacter, error) GetOne(ctx context.Context, userCharacterId uuid.UUID) (*UserCharacter, error) CreateOne(ctx context.Context, userCharacter *UserCharacter) (*UserCharacter, error) UpdateOne(ctx context.Context, userCharacterId uuid.UUID, updateData map[string]interface{}) (*UserCharacter, error) DeleteOne(ctx context.Context, userCharacterId uuid.UUID) error }
type UserDailyQuest ¶
type UserDailyQuest struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` DailyQuestID uuid.UUID `json:"dailyQuestId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` Completed bool `json:"completed" gorm:"type:boolean;default:false"` CompletedAt time.Time `json:"completed_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` DailyQuest models.DailyQuest `gorm:"foreignKey:DailyQuestID;references:ID"` }
type UserDailyQuestRepository ¶
type UserDailyQuestRepository interface { GetMany(ctx context.Context) ([]*UserDailyQuest, error) GetOne(ctx context.Context, userDailyQuestId uuid.UUID) (*UserDailyQuest, error) GetAllByUser(ctx context.Context, userId uuid.UUID) ([]*UserDailyQuest, error) CreateOne(ctx context.Context, UserDailyQuest *UserDailyQuest) (*UserDailyQuest, error) UpdateOne(ctx context.Context, userDailyQuestId uuid.UUID, updateData map[string]interface{}) (*UserDailyQuest, error) DeleteOne(ctx context.Context, userDailyQuestId uuid.UUID) error }
type UserQuiz ¶
type UserQuiz struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` QuizID uuid.UUID `json:"quizId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` Progress utils.NestedJSONMap `json:"progress" gorm:"type:jsonb"` Score int `json:"score" gorm:"type:int"` StartedAt time.Time `json:"started_at" gorm:"type:timestamp"` // Timestamp for when the quiz started CompletedAt time.Time `json:"completed_at" gorm:"type:timestamp"` // Timestamp for when the quiz was completed CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"udpated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` Quiz models.Quiz `gorm:"foreignKey:QuizID;references:ID"` }
type UserQuizRepository ¶
type UserQuizRepository interface { GetMany(ctx context.Context) ([]*UserQuiz, error) GetOne(ctx context.Context, userQuizId uuid.UUID) (*UserQuiz, error) GetAllByUser(ctx context.Context, userId uuid.UUID) ([]*UserQuiz, error) CreateOne(ctx context.Context, userQuiz *UserQuiz) (*UserQuiz, error) UpdateOne(ctx context.Context, userQuizId uuid.UUID, updateData map[string]interface{}) (*UserQuiz, error) DeleteOne(ctx context.Context, userQuizId uuid.UUID) error }
type UserReward ¶
type UserReward struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` RewardID uuid.UUID `json:"rewardId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` EarnedAt time.Time `json:"earned_at" gorm:"type:timestamp"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` Reward models.Reward `gorm:"foreignKey:RewardID;references:ID"` }
type UserRewardRepository ¶
type UserRewardRepository interface { GetMany(ctx context.Context) ([]*UserReward, error) GetAllByUser(ctx context.Context, userId uuid.UUID) ([]*UserReward, error) GetOne(ctx context.Context, userRewardId uuid.UUID) (*UserReward, error) CreateOne(ctx context.Context, userReward *UserReward) (*UserReward, error) UpdateOne(ctx context.Context, userRewardId uuid.UUID, updateData map[string]interface{}) (*UserReward, error) DeleteOne(ctx context.Context, userRewardId uuid.UUID) error }
type UserTask ¶
type UserTask struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` UserID uuid.UUID `json:"userId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` TaskID uuid.UUID `json:"taskId" gorm:"type:uuid;not null;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;references:ID"` Status string `json:"status" gorm:"type:varchar(255);default:'Not started'"` CompletedAt time.Time `json:"completed_at" gorm:"type:timestamp"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User models.User `gorm:"foreignKey:UserID;references:ID"` Task models.Task `gorm:"foreignKey:TaskID;references:ID"` }
type UserTaskRepository ¶
type UserTaskRepository interface { GetMany(ctx context.Context) ([]*UserTask, error) GetAllByUser(ctx context.Context, userId uuid.UUID) ([]*UserTask, error) GetOne(ctx context.Context, userTaskId uuid.UUID) (*UserTask, error) CreateOne(ctx context.Context, userTask *UserTask) (*UserTask, error) UpdateOne(ctx context.Context, userTaskId uuid.UUID, updateData map[string]interface{}) (*UserTask, error) DeleteOne(ctx context.Context, userTaskId uuid.UUID) error }
Click to show internal directories.
Click to hide internal directories.