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

@@ -14,6 +14,7 @@ type Agenda struct {
AttendanceId uuid.UUID `json:"attendance_id" gorm:"type:uuid;not null"`
Name string `json:"name" gorm:"type:varchar(255);not null"`
Description string `json:"description" gorm:"type:text;not null"`
IsApproved bool `json:"is_approved" gorm:"type:boolean;default:false"`
}
func (self *Agenda) SetAttendanceId(id uuid.UUID) *Agenda {
@@ -31,6 +32,11 @@ func (self *Agenda) SetDescription(desc string) *Agenda {
return self
}
func (self *Agenda) SetIsApproved(approved bool) *Agenda {
self.IsApproved = approved
return self
}
func (self *Agenda) GetByAgendaId(ctx context.Context, agendaId uuid.UUID) (*Agenda, error) {
var agenda Agenda