models

package
v0.0.0-...-31a7496 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START      = 0
	WANT_GRANT = 1
)
View Source
const (
	IN_WORK   = 1
	ON_REVIEW = 2
	DONE      = 3
)

Variables

This section is empty.

Functions

func Setup

func Setup()

Setup initializes the database instance

func Start

func Start() (string, error)

Types

type Answer

type Answer struct {
	ID        int    `json:"id"`
	Questions string `json:"question"`
	Answers   string `json:"answer"`
}

func GetAnswer

func GetAnswer(question string) (*Answer, error)

GetAnswer get answer for question

type Application

type Application struct {
	ID int `json:"id"`

	Grant   Grant `json:"grant"`
	GrantId int   `json:"grantId"`

	Status   Status `json:"status"`
	StatusId int    `json:"statusId"`

	UserId int       `json:"userId"`
	Dates  time.Time `json:"date"`
}

func GetApplications

func GetApplications() ([]Application, error)

GetApplications get answer for question

type Grant

type Grant struct {
	ID         int       `json:"id"`
	Names      string    `json:"name"`
	DateStarts time.Time `json:"dateStart"`
	DateEnds   time.Time `json:"dateEnd"`
}

type Migration

type Migration struct {
	IsMigrated bool `json:"isMigrated"`
}

type Model

type Model struct {
	ID         int `gorm:"primary_key" json:"id"`
	CreatedOn  int `json:"created_on"`
	ModifiedOn int `json:"modified_on"`
	DeletedOn  int `json:"deleted_on"`
}

type Status

type Status struct {
	ID    int    `json:"id"`
	Names string `json:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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