-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
96 lines (82 loc) · 1.89 KB
/
Copy pathmodels.go
File metadata and controls
96 lines (82 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.26.0
package database
import (
"database/sql/driver"
"fmt"
"github.com/jackc/pgx/v5/pgtype"
)
type ReportType string
const (
ReportTypeHail ReportType = "hail"
ReportTypeWind ReportType = "wind"
ReportTypeTornado ReportType = "tornado"
)
func (e *ReportType) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ReportType(s)
case string:
*e = ReportType(s)
default:
return fmt.Errorf("unsupported scan type for ReportType: %T", src)
}
return nil
}
type NullReportType struct {
ReportType ReportType
Valid bool // Valid is true if ReportType is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullReportType) Scan(value interface{}) error {
if value == nil {
ns.ReportType, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ReportType.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullReportType) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ReportType), nil
}
type NwsOffice struct {
ID string
City pgtype.Text
State pgtype.Text
}
type Report struct {
RptType ReportType
ReportedTime pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
VarCol pgtype.Int4
DistFromLocation int32
HeadingFromLocation string
County string
State pgtype.Text
Latitude pgtype.Text
Longitude pgtype.Text
EventLocation interface{}
Comments pgtype.Text
NwsOffice pgtype.Text
Location string
}
type SchemaMigration struct {
Version int64
Dirty bool
}
type SpatialRefSy struct {
Srid int32
AuthName pgtype.Text
AuthSrid pgtype.Int4
Srtext pgtype.Text
Proj4text pgtype.Text
}
type XrefReportTypeVarCol struct {
RptType ReportType
ColumnHeading string
}