models

package
v0.0.0-...-c16ca65 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentInfo

type AssignmentInfo struct {
	SAID             *uuid.UUID `db:"sa_id"` // survey_assignment id
	SEID             *uuid.UUID `db:"se_id"` // survey_element id
	Completed        *bool      `db:"completed"`
	SurveyOrder      *int       `db:"survey_order"`
	NextSurveyOrder  *int       `db:"next_survey_order"`
	NextSurveySEID   *uuid.UUID `db:"next_survey_seid"`
	NextControlOrder *int       `db:"next_control_order"`
	NextControlSEID  *uuid.UUID `db:"next_control_seid"`
}

type JwtClaim

type JwtClaim struct {
	Sub  string
	Name string
}

type Survey

type Survey struct {
	ID          uuid.UUID `db:"id" json:"id"`
	Title       string    `db:"title" json:"title"`
	Description string    `db:"description" json:"description"`
	Active      bool      `db:"active" json:"active"`
}

type SurveyAssignment

type SurveyAssignment struct {
	ID               uuid.UUID `json:"saId" db:"id" dbid:"AUTOINCREMENT"`
	SurveyElement_ID uuid.UUID `json:"seId" db:"se_id"`
	Completed        bool      `json:"completed" db:"completed"`
	Assigned         string    `json:"assignedTo" db:"assigned_to"`
}

type SurveyElement

type SurveyElement struct {
	ID          uuid.UUID `json:"seId" db:"id" dbid:"AUTOINCREMENT"`
	SurveyID    uuid.UUID `json:"surveyId" db:"survey_id"`
	SurveyOrder int       `json:"surveyOrder" db:"survey_order"`
	FD_ID       int       `json:"fdId" db:"fd_id"`
	Is_control  bool      `json:"isControl" db:"is_control"`
}

type SurveyElementAlt

type SurveyElementAlt struct {
	SurveyOrder int  `json:"surveyOrder" db:"survey_order"`
	FD_ID       int  `json:"fdId" db:"fd_id"`
	Is_control  bool `json:"isControl" db:"is_control"`
}

SurveyElementAlt is a stripped down SurveyElement intended for GetSurveyElements response payload

type SurveyMember

type SurveyMember struct {
	ID       uuid.UUID `db:"id" json:"id"`
	SurveyID uuid.UUID `db:"survey_id" json:"surveyId"`
	UserID   string    `db:"user_id" json:"userId"`
	IsOwner  bool      `db:"is_owner" json:"isOwner"`
}

type SurveyMemberAlt

type SurveyMemberAlt struct {
	ID       uuid.UUID `db:"id" json:"id"`
	UserID   string    `db:"user_id" json:"userId"`
	UserName string    `db:"user_name" json:"userName"`
	IsOwner  bool      `db:"is_owner" json:"isOwner"`
}

used in GetSurveyMembers handler

type SurveyResult

type SurveyResult struct {
	SRID      uuid.UUID `db:"sr_id" json:"srId"`
	UserID    string    `db:"user_id" json:"userId"`
	UserName  string    `db:"user_name" json:"userName"`
	Completed bool      `db:"completed" json:"completed"`
	IsControl bool      `db:"is_control" json:"isControl"`

	SurveyStructure
}

func (SurveyResult) String

func (sr SurveyResult) String() []string

type SurveyStructure

type SurveyStructure struct {
	SAID             uuid.UUID `db:"sa_id" json:"saId"`
	FDID             int       `db:"fd_id" json:"fdId"`
	X                float64   `db:"x" json:"x"`
	Y                float64   `db:"y" json:"y"`
	InvalidStructure bool      `db:"invalid_structure" json:"invalidStructure"`
	NoStreetView     bool      `db:"no_street_view" json:"noStreetView"`
	CBfips           string    `db:"cbfips" json:"cbfips"`
	OccupancyType    string    `db:"occtype" json:"occupancyType"`
	Damcat           string    `db:"st_damcat" json:"damcat"`
	FoundHt          float64   `db:"found_ht" json:"found_ht"`
	Stories          float64   `db:"num_story" json:"stories"`
	SqFt             float64   `db:"sqft" json:"sq_ft"`
	FoundType        string    `db:"found_type" json:"found_type"`
	RsmeansType      string    `db:"rsmeans_type" json:"rsmeans_type"`
	Quality          string    `db:"quality" json:"quality"`
	ConstType        string    `db:"const_type" json:"const_type"`
	Garage           string    `db:"garage" json:"garage"`
	RoofStyle        string    `db:"roof_style" json:"roof_style"`
}

type User

type User struct {
	UserID   string `db:"user_id" json:"userId"`
	Username string `db:"user_name" json:"userName"`
}

Jump to

Keyboard shortcuts

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