Documentation ¶
Index ¶
Constants ¶
View Source
const ( PORT string = ":3000" DB_FILE string = "base.db" )
constant declarations
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
func NewApplication ¶
func NewApplication(config Config) *Application
func (*Application) ConnectDatabase ¶
func (app *Application) ConnectDatabase(config gorm.Config) *Application
func (*Application) Listen ¶
func (app *Application) Listen() error
type Database ¶
func NewDatabase ¶
func (*Database) HandleMigrations ¶
func (DB *Database) HandleMigrations()
type Project ¶
type Project struct { ID string `gorm:"primaryKey"` Name string `gorm:"not null"` Sections []Section `gorm:"foreignKey:ProjectID; constraint:OnDelete:CASCADE;"` CreatedAt int64 `gorm:"autoUpdateTime:nano"` UpdatedAt int64 `gorm:"autoCreateTime:nano"` }
----- `Project` model
type Section ¶
type Section struct { ID string `gorm:"primaryKey"` Heading string `gorm:"not null"` ProjectID string `gorm:"not null"` Tasks []Task `gorm:"foreignKey:SectionID; constraint:OnDelete:CASCADE;"` CreatedAt int64 `gorm:"autoUpdateTime:nano"` UpdatedAt int64 `gorm:"autoCreateTime:nano"` }
----- `Section` model
type SubTask ¶
type SubTask struct { ID string `gorm:"primaryKey"` Heading string `gorm:"not null"` Description string Priority uint `gorm:"not null; default:4"` Done bool `gorm:"not null; default:false"` TaskID string `gorm:"not null"` CreatedAt int64 `gorm:"autoUpdateTime:nano"` UpdatedAt int64 `gorm:"autoCreateTime:nano"` }
----- `SubTask` model
type Task ¶
type Task struct { ID string `gorm:"primaryKey"` Heading string `gorm:"not null"` Description string Priority uint `gorm:"not null; default:4"` Done bool `gorm:"not null; default:false"` SectionID string `gorm:"not null"` SubTasks []SubTask `gorm:"foreignKey:TaskID; constraint:OnDelete:CASCADE;"` CreatedAt int64 `gorm:"autoUpdateTime:nano"` UpdatedAt int64 `gorm:"autoCreateTime:nano"` }
----- `Task` model
Click to show internal directories.
Click to hide internal directories.