clubs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AchievementRequest

type AchievementRequest struct {
	Achievement string `json:"achievement"`
}

type AchievementResponse

type AchievementResponse struct {
	Achievement string `json:"achievement"`
}

type Achievements

type Achievements []ClubAchievement

func (Achievements) ToAchievementResponse

func (ac Achievements) ToAchievementResponse() []AchievementResponse

type ActivityDetail

type ActivityDetail struct {
	TimeID   uint32     `gorm:"type:int unsigned;not null;primaryKey"`
	PlaceID  uint32     `gorm:"type:int unsigned;not null;primaryKey"`
	ClubUUID string     `gorm:"type:char(36);not null"`
	Remarks  ClubRemark `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
}

type ActivityDetailRequest

type ActivityDetailRequest struct {
	TimeID      uint32  `json:"time_id"`
	Date        string  `json:"date"`
	Time        string  `json:"time"`
	TimeRemark  *string `json:"time_remark"`
	PlaceID     uint32  `json:"place_id"`
	Place       string  `json:"place"`
	PlaceRemark *string `json:"place_remark"`
}

type ActivityDetailResponse

type ActivityDetailResponse struct {
	TimeID      uint32  `json:"time_id"`
	Date        string  `json:"date"`
	Time        string  `json:"time"`
	TimeRemark  *string `json:"time_remark"`
	PlaceID     uint32  `json:"place_id"`
	Place       string  `json:"place"`
	PlaceRemark *string `json:"place_remark"`
}

type ClubAchievement

type ClubAchievement struct {
	AchievementID uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID      string `gorm:"type:char(36);not null"`
	Achievement   string `gorm:"type:text;not null"`
}

type ClubContent

type ClubContent struct {
	ContentID uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID  string `gorm:"type:char(36);not null"`
	Content   string `gorm:"type:text;not null;unique"`
}

type ClubImage

type ClubImage struct {
	ImageID  uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID string `gorm:"type:char(36);not null"`
	Path     string `gorm:"->"`
}
type ClubLink struct {
	LinkID   uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID string `gorm:"type:char(36);not null"`
	Label    string `gorm:"type:varchar(255);not null;unique"`
	URL      string `gorm:"type:varchar(2047);not null;unique"`
}

type ClubPage

type ClubPage struct {
	ClubUUID         string           `gorm:"type:char(36);not null;primaryKey"`
	ClubSlug         string           `gorm:"type:char(15);not null;unique"`
	Name             string           `gorm:"type:varchar(63);not null"`
	Description      string           `gorm:"type:text;not null"`
	ShortDescription string           `gorm:"type:varchar(50);not null"`
	Campus           uint8            `gorm:"type:tinyint;not null"`
	ClubType         uint8            `gorm:"type:tinyint;not null"`
	ClubRemark       sql.NullString   `gorm:"type:text"`
	ScheduleRemark   sql.NullString   `gorm:"type:text"`
	Visible          bool             `gorm:"type:tinyint(1);not null"`
	UpdatedAt        time.Time        `gorm:"type:datetime;not null"`
	Thumbnail        ClubThumbnail    `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Contents         Contents         `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Links            Links            `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Schedules        Schedules        `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Achievements     Achievements     `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Images           Images           `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	Videos           Videos           `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
	ActivityDetails  []ActivityDetail `gorm:"foreignKey:ClubUUID;references:ClubUUID"`
}

ClubPage DB モデル

type ClubPageExternalInfo

type ClubPageExternalInfo struct {
	ClubUUID         string            `json:"club_uuid"`
	ClubSlug         string            `json:"club_slug"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	ShortDescription string            `json:"short_description"`
	Campus           uint8             `json:"campus"`
	ClubType         uint8             `json:"club_type"`
	UpdatedAt        time.Time         `json:"updated_at"`
	Thumbnail        ThumbnailResponse `json:"thumbnail"`
}

type ClubPageInternalInfo

type ClubPageInternalInfo struct {
	ClubUUID         string                   `json:"club_uuid"`
	Name             string                   `json:"name"`
	Description      string                   `json:"description"`
	ShortDescription string                   `json:"short_description"`
	Campus           uint8                    `json:"campus"`
	ClubType         uint8                    `json:"club_type"`
	ClubRemark       *string                  `json:"club_remark"`
	ScheduleRemark   *string                  `json:"schedule_remark"`
	UpdatedAt        time.Time                `json:"updated_at"`
	Contents         []ContentResponse        `json:"contents"`
	Links            []LinkResponse           `json:"links"`
	Schedules        []ScheduleResponse       `json:"schedules"`
	Achievements     []AchievementResponse    `json:"achievements"`
	Images           []ImageResponse          `json:"images"`
	Videos           []VideoResponse          `json:"videos"`
	TimePlaces       []ActivityDetailResponse `json:"activity_details"`
}

type ClubPageRestrictedInfo

type ClubPageRestrictedInfo struct {
	ClubUUID         string          `json:"club_uuid"`
	Name             string          `json:"name"`
	Description      string          `json:"description"`
	ShortDescription string          `json:"short_description"`
	Campus           uint8           `json:"campus"`
	ClubType         uint8           `json:"club_type"`
	UpdatedAt        time.Time       `json:"updated_at"`
	Links            []LinkResponse  `json:"links"`
	Images           []ImageResponse `json:"images"`
	Videos           []VideoResponse `json:"videos"`
}

type ClubPlace

type ClubPlace struct {
	PlaceID  uint32     `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	Place    string     `gorm:"type:text;not null;unique"`
	ClubTime []ClubTime `gorm:"many2many:activity_details;foreignKey:PlaceID;joinForeignKey:PlaceID;references:TimeID;joinReferences:TimeID"`
}

func (*ClubPlace) GetPlace

func (cp *ClubPlace) GetPlace() string

func (*ClubPlace) GetPlaceID

func (cp *ClubPlace) GetPlaceID() uint32

type ClubRemark

type ClubRemark struct {
	RemarkID    uint32         `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID    string         `gorm:"type:char(36);not null"`
	PlaceID     uint32         `gorm:"type:int unsigned not null"`
	TimeID      uint32         `gorm:"type:int unsigned not null"`
	PlaceRemark sql.NullString `gorm:"type:text"`
	TimeRemark  sql.NullString `gorm:"type:text"`
}

type ClubSchedule

type ClubSchedule struct {
	ScheduleID uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID   string `gorm:"type:char(36);not null"`
	Month      uint8  `gorm:"type:tinyint unsigned;not null;unique"`
	Schedule   string `gorm:"type:text;not null;unique"`
}

type ClubSearchResponse added in v0.0.3

type ClubSearchResponse struct {
	Result []ClubPageExternalInfo `json:"result"`
}

type ClubThumbnail

type ClubThumbnail struct {
	ThumbnailID uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID    string `gorm:"type:char(36);not null"`
	Path        string `gorm:"->"`
}

func (*ClubThumbnail) ToThumbnailResponse

func (ct *ClubThumbnail) ToThumbnailResponse() ThumbnailResponse

type ClubTime

type ClubTime struct {
	TimeID    uint32      `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	Date      string      `gorm:"type:varchar(3);not null;unique"`
	Time      string      `gorm:"type:varchar(255);not null;unique"`
	ClubPlace []ClubPlace `gorm:"many2many:activity_details;foreignKey:TimeID;joinForeignKey:TimeID;references:PlaceID;joinReferences:PlaceID"`
}

func (*ClubTime) GetDate

func (ct *ClubTime) GetDate() string

func (*ClubTime) GetTime

func (ct *ClubTime) GetTime() string

func (*ClubTime) GetTimeID

func (ct *ClubTime) GetTimeID() uint32

type ClubVideo

type ClubVideo struct {
	VideoID  uint32 `gorm:"type:int unsigned not null auto_increment;primaryKey"`
	ClubUUID string `gorm:"type:char(36);not null"`
	Path     string `gorm:"type:text;not null;unique"`
}

type ContentRequest

type ContentRequest struct {
	Content string `json:"content"`
}

type ContentResponse

type ContentResponse struct {
	Content string `json:"content"`
}

type Contents

type Contents []ClubContent

func (Contents) ToContentResponse

func (c Contents) ToContentResponse() []ContentResponse

type DetailRelations

type DetailRelations struct {
	ClubUUID    string
	TimeID      uint32
	Date        string
	Time        string
	PlaceID     uint32
	Place       string
	RemarkID    uint32
	PlaceRemark sql.NullString
	TimeRemark  sql.NullString
}

type ImageRequest

type ImageRequest struct {
	ImageID uint32 `json:"image_id"`
}

type ImageResponse

type ImageResponse struct {
	ImageID uint32 `json:"image_id"`
	Path    string `json:"path"`
}

type Images

type Images []ClubImage

func (Images) ToImageResponse

func (im Images) ToImageResponse() []ImageResponse

type LinkRequest

type LinkRequest struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

type LinkResponse

type LinkResponse struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}
type Links []ClubLink

func (Links) ToLinkResponse

func (l Links) ToLinkResponse() []LinkResponse

func (Links) ToRestrictedLinkResponse

func (l Links) ToRestrictedLinkResponse() []LinkResponse

type Pages

type Pages []ClubPage

func (Pages) GetUUIDs

func (p Pages) GetUUIDs() []string

func (Pages) ToClubSearchResponse added in v0.0.3

func (p Pages) ToClubSearchResponse() *ClubSearchResponse

func (Pages) ToExternalInfo

func (p Pages) ToExternalInfo() []ClubPageExternalInfo

type PlaceResponse

type PlaceResponse struct {
	Place   string  `json:"place"`
	Remarks *string `json:"remarks"`
}

type Places

type Places []ClubPlace

func (Places) ToPlaceResponse

func (p Places) ToPlaceResponse(remarks []ClubRemark) []PlaceResponse

type Relations

type Relations []DetailRelations

func (Relations) ToActivityDetailResponse

func (r Relations) ToActivityDetailResponse() []ActivityDetailResponse

func (Relations) ToClubPlace

func (r Relations) ToClubPlace() []ClubPlace

func (Relations) ToClubRemark

func (r Relations) ToClubRemark() []ClubRemark

func (Relations) ToClubTime

func (r Relations) ToClubTime() []ClubTime

type ScheduleRequest

type ScheduleRequest struct {
	Month    uint8  `json:"month"`
	Schedule string `json:"schedule"`
}

type ScheduleResponse

type ScheduleResponse struct {
	Month    uint8  `json:"month"`
	Schedule string `json:"schedule"`
}

type Schedules

type Schedules []ClubSchedule

func (Schedules) ToScheduleResponse

func (s Schedules) ToScheduleResponse() []ScheduleResponse

type ThumbnailResponse

type ThumbnailResponse struct {
	ThumbnailID uint32 `json:"thumbnail_id"`
	Path        string `json:"path"`
}

type TimeResponse

type TimeResponse struct {
	Date    string  `json:"date"`
	Time    string  `json:"time"`
	Remarks *string `json:"remarks"`
}

type Times

type Times []ClubTime

func (Times) ToTimeResponse

func (t Times) ToTimeResponse(remarks []ClubRemark) []TimeResponse

type VideoRequest

type VideoRequest struct {
	Path string `json:"path"`
}

type VideoResponse

type VideoResponse struct {
	Path string `json:"path"`
}

type Videos

type Videos []ClubVideo

func (Videos) ToVideoResponse

func (v Videos) ToVideoResponse() []VideoResponse

Jump to

Keyboard shortcuts

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