mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-28 11:37:42 +01:00
Merge pull request #14914 from ywk253100/210518_registry
Update the field name of registry model
This commit is contained in:
commit
08ed886936
@ -45,7 +45,7 @@ func (d *daoTestSuite) SetupTest() {
|
|||||||
Name: "harbor",
|
Name: "harbor",
|
||||||
Type: "harbor",
|
Type: "harbor",
|
||||||
Insecure: false,
|
Insecure: false,
|
||||||
Health: "health",
|
Status: "health",
|
||||||
}
|
}
|
||||||
id, err := d.dao.Create(d.ctx, registry)
|
id, err := d.dao.Create(d.ctx, registry)
|
||||||
d.Require().Nil(err)
|
d.Require().Nil(err)
|
||||||
|
@ -34,7 +34,7 @@ type Registry struct {
|
|||||||
Type string `orm:"column(type)"`
|
Type string `orm:"column(type)"`
|
||||||
Insecure bool `orm:"column(insecure)"`
|
Insecure bool `orm:"column(insecure)"`
|
||||||
Description string `orm:"column(description)"`
|
Description string `orm:"column(description)"`
|
||||||
Health string `orm:"column(health)"`
|
Status string `orm:"column(health)"`
|
||||||
CreationTime time.Time `orm:"column(creation_time);auto_now_add"`
|
CreationTime time.Time `orm:"column(creation_time);auto_now_add"`
|
||||||
UpdateTime time.Time `orm:"column(update_time);auto_now"`
|
UpdateTime time.Time `orm:"column(update_time);auto_now"`
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ func fromDaoModel(registry *dao.Registry) (*model.Registry, error) {
|
|||||||
Credential: &model.Credential{},
|
Credential: &model.Credential{},
|
||||||
URL: registry.URL,
|
URL: registry.URL,
|
||||||
Insecure: registry.Insecure,
|
Insecure: registry.Insecure,
|
||||||
Status: registry.Health,
|
Status: registry.Status,
|
||||||
CreationTime: registry.CreationTime,
|
CreationTime: registry.CreationTime,
|
||||||
UpdateTime: registry.UpdateTime,
|
UpdateTime: registry.UpdateTime,
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ func toDaoModel(registry *model.Registry) (*dao.Registry, error) {
|
|||||||
Type: string(registry.Type),
|
Type: string(registry.Type),
|
||||||
Insecure: registry.Insecure,
|
Insecure: registry.Insecure,
|
||||||
Description: registry.Description,
|
Description: registry.Description,
|
||||||
Health: registry.Status,
|
Status: registry.Status,
|
||||||
CreationTime: registry.CreationTime,
|
CreationTime: registry.CreationTime,
|
||||||
UpdateTime: registry.UpdateTime,
|
UpdateTime: registry.UpdateTime,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user