Skip to content

Commit 6286950

Browse files
committed
database
1 parent 1d0bf63 commit 6286950

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pkg/model/cert.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import (
55
)
66

77
type Certificate struct {
8-
Serial string `gorm:"primaryKey;size:255"`
9-
CreatedAt time.Time
10-
UpdatedAt time.Time
11-
Login string `gorm:"not null;index;size:255"`
12-
UID string `gorm:"index;size:255"`
13-
LastConnect *time.Time
14-
ValidTill *time.Time
8+
Serial string `gorm:"primaryKey;size:255"`
9+
CreatedAt time.Time `gorm:"index;type:timestamp"`
10+
UpdatedAt time.Time `gorm:"type:timestamp"`
11+
Login string `gorm:"not null;index;size:255"`
12+
UID string `gorm:"index;size:255"`
13+
LastConnect *time.Time `gorm:"type:timestamp"`
14+
ValidTill *time.Time `gorm:"type:timestamp"`
1515
}
1616

1717
type CertificateDTO struct {

pkg/model/change.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212

1313
type Change struct {
1414
ID uint `gorm:"primaryKey"`
15-
CreatedAt time.Time `gorm:"index"`
15+
CreatedAt time.Time `gorm:"index;type:timestamp"`
1616
Type string `gorm:"size:255"`
1717
MissionID uint `gorm:"index;not null"`
1818
CreatorUID string `gorm:"size:255"`

pkg/model/video.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type Feed2 struct {
6363
Heading string `gorm:"size:100"`
6464
Range string `gorm:"size:100"`
6565
User string `gorm:"size:255;index"`
66-
Scope string `gorm:"size:255"`
66+
Scope string `gorm:"size:255;index"`
6767
}
6868

6969
type Feed2DTO struct {

0 commit comments

Comments
 (0)