Documentation
¶
Index ¶
- Constants
- func CreateAttendance(tx *gorm.DB, userID int64, eventID int64) error
- func DeleteAttendance(tx *gorm.DB, userID int64, eventID int64) error
- func FindAttendanceByUserIDAndEventID(tx *gorm.DB, userID int64, eventID int64, dest interface{}) error
- func FindEventByID(tx *gorm.DB, id int64, dest interface{}) error
- func FindEventsByIDs(tx *gorm.DB, ids []int64, dests interface{}) error
- func FindHackathonByEventID(tx *gorm.DB, eventID int64, dest interface{}) error
- func FindScheduleByEventID(tx *gorm.DB, eventID int64, dest interface{}) error
- func FindUserEnrolledEventsByUserID(tx *gorm.DB, userID int64, dests *[]Event) error
- type Attendance
- type Event
- type Hackathon
- type Schedule
Constants ¶
View Source
const ( EventTypeNull uint16 = iota EventTypeOther EventTypeSalon EventTypeLecture EventTypeHackathon )
Variables ¶
This section is empty.
Functions ¶
func FindHackathonByEventID ¶
func FindScheduleByEventID ¶
Types ¶
type Attendance ¶
type Event ¶
type Event struct { gorm.Model // 活动ID ID int64 `gorm:"type:bigint;primaryKey;not null"` // 活动添加者ID OwnerUserID int64 `gorm:"type:bigint;not null"` // 活动举办方 Organizer string `gorm:"not null"` // 活动标题 Title string `gorm:"not null"` // 活动介绍 Description string `gorm:"not null"` // 活动宣传图 ImageUrl string `gorm:"not null"` // 活动开始时间 StartedAt time.Time `gorm:"not null"` // 活动结束时间 EndedAt time.Time `gorm:"not null"` // 活动地点 Location string `gorm:"not null"` // 活动类型 EventType uint16 `gorm:"not null;default:1"` }
type Hackathon ¶
type Hackathon struct { gorm.Model // 活动时间表主键 ID int64 `gorm:"type:bigint;primaryKey;not null"` // 从属的活动ID EventID int64 `gorm:"type:bigint;not null"` // 步骤 Steps string `gorm:"not null"` }
类型为 EventKindHackathon 的活动详细步骤
type Schedule ¶
type Schedule struct { gorm.Model // 活动时间表主键 ID int64 `gorm:"type:bigint;primaryKey;not null"` // 从属的活动ID EventID int64 `gorm:"type:bigint;not null"` // 标题 Title string `gorm:"not null"` // 该时间段开始时间 StartedAt time.Time `gorm:"not null"` // 该时间段结束时间 EndedAt time.Time `gorm:"not null"` // 该时间段主讲人姓名 TalkerName string `gorm:"not null"` // 头衔 TalkerTitle string `gorm:"not null"` // 头像 TalkerAvatarURL string `gorm:"not null"` // 介绍 TalkerDescription string `gorm:"not null"` }
类型为 EventKindSalon, EventKindLecture 的时间安排表
Click to show internal directories.
Click to hide internal directories.