dto

package
v0.0.0-...-2ddb24b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opinion

type Opinion struct {
	OpinionID       shared.UUID[opinion.Opinion]
	TalkSessionID   shared.UUID[talksession.TalkSession]
	UserID          shared.UUID[user.User]
	ParentOpinionID *shared.UUID[opinion.Opinion]
	Title           *string
	Content         string
	CreatedAt       time.Time
	PictureURL      *string
	ReferenceURL    *string
}

type OpinionGroup

type OpinionGroup struct {
	GroupName string
	GroupID   int
	Opinions  []OpinionWithRepresentative
}

type OpinionWithRepresentative

type OpinionWithRepresentative struct {
	Opinion
	User
	RepresentativeOpinion
	ReplyCount int
}

type RepresentativeOpinion

type RepresentativeOpinion struct {
	TalkSessionID shared.UUID[talksession.TalkSession]
	OpinionID     shared.UUID[opinion.Opinion]
	GroupID       int
	AgreeCount    int
	DisagreeCount int
	PassCount     int
}

type SwipeOpinion

type SwipeOpinion struct {
	Opinion         Opinion
	User            User
	CurrentVoteType int
	ReplyCount      int
	ParentVoteType  int
}

func (*SwipeOpinion) GetMyVoteType

func (s *SwipeOpinion) GetMyVoteType() string

func (*SwipeOpinion) GetParentVoteType

func (s *SwipeOpinion) GetParentVoteType() string

type TalkSession

type TalkSession struct {
	TalkSessionID    shared.UUID[talksession.TalkSession]
	OwnerID          shared.UUID[user.User]
	Theme            string
	ScheduledEndTime time.Time
	CreatedAt        time.Time
	Description      *string
	City             *string
	Prefecture       *string
}

type TalkSessionConclusion

type TalkSessionConclusion struct {
	TalkSessionID string
	Content       string
}

type TalkSessionWithDetail

type TalkSessionWithDetail struct {
	TalkSession
	User         User
	OpinionCount int
	Latitude     *float64
	Longitude    *float64
}

func (*TalkSessionWithDetail) HasLocation

func (t *TalkSessionWithDetail) HasLocation() bool

Latitude, Longitudeはnull, または0の場合はfalseを返す

type User

type User struct {
	DisplayID   string
	DisplayName string
	IconURL     *string
}

type UserAuth

type UserAuth struct {
	UserAuthID uuid.UUID
	Provider   string
	IsVerified bool
}

type UserDemographic

type UserDemographic struct {
	UserDemographicID uuid.UUID
	UserID            shared.UUID[user.User]
	YearOfBirth       *int
	Occupation        *int
	Gender            *int
	City              *string
	Prefecture        *string
	HouseholdSize     *int
}

func (*UserDemographic) Age

func (u *UserDemographic) Age(ctx context.Context) *int

func (*UserDemographic) GenderString

func (u *UserDemographic) GenderString() *string

func (*UserDemographic) OccupationString

func (u *UserDemographic) OccupationString() string

type UserDetail

type UserDetail struct {
	User
	UserAuth
	*UserDemographic
}

type UserPosition

type UserPosition struct {
	PosX           float64
	PosY           float64
	DisplayID      string
	DisplayName    string
	IconURL        *string
	GroupName      string
	GroupID        int
	PerimeterIndex *int
}

func (*UserPosition) GetGroupName

func (u *UserPosition) GetGroupName(ctx context.Context) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL