models

package
v0.0.0-...-f8d7350 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Filename: internal/models/questions.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Question

type Question struct {
	QuestionID int64
	Body       string
	CreateAt   time.Time
}

Lets model the question table

type QuestionModel

type QuestionModel struct {
	DB *sql.DB
}

Setup Dependency Injection (Required for all models)

func (*QuestionModel) Get

func (m *QuestionModel) Get() (*Question, error)

Write SQL code to access the database TODO

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL