I am batman

This commit is contained in:
2026-07-12 20:26:16 -04:00
commit 5a3a6357cf
37 changed files with 2938 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package models
import (
"gorm.io/gorm"
)
type TaskSection struct {
gorm.Model
Title string `gorm:"not null" json:"title"`
Position int `gorm:"not null;default:0" json:"position"`
Tasks []Tasks `gorm:"foreignKey:SectionID;references:ID;constraint:OnDelete:CASCADE;" json:"tasks,omitempty"`
}
type Tasks struct {
gorm.Model
Title string `gorm:"not null" json:"title"`
Description string `json:"description"`
Position int `gorm:"not null;default:0" json:"position"`
SectionID uint `gorm:"index" json:"section_id"`
Section TaskSection `gorm:"foreignKey:SectionID;references:ID;constraint:OnDelete:CASCADE;" json:"section,omitempty"`
}