Add agenda service and submit api

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-02-06 18:32:46 +08:00
parent b2f216f1bd
commit c9e987e2ba
30 changed files with 1228 additions and 365 deletions

View File

@@ -59,11 +59,11 @@ func (self *Attendance) SetState(s string) *Attendance {
}
func (self *Attendance) GetAttendance(ctx context.Context, userId, eventId uuid.UUID) (*Attendance, error) {
var checkin Attendance
var attendance Attendance
err := Database.WithContext(ctx).
Where("user_id = ? AND event_id = ?", userId, eventId).
First(&checkin).Error
First(&attendance).Error
if err != nil {
if err == gorm.ErrRecordNotFound {
@@ -72,7 +72,7 @@ func (self *Attendance) GetAttendance(ctx context.Context, userId, eventId uuid.
return nil, err
}
return &checkin, err
return &attendance, err
}
type AttendanceUsers struct {