forked from goharbor/harbor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
policy.go
26 lines (23 loc) · 1.26 KB
/
policy.go
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
package models
import "time"
// RepPolicy is the model for a ng replication policy.
type RepPolicy struct {
ID int64 `orm:"pk;auto;column(id)" json:"id"`
Name string `orm:"column(name)" json:"name"`
Description string `orm:"column(description)" json:"description"`
Creator string `orm:"column(creator)" json:"creator"`
SrcRegistryID int64 `orm:"column(src_registry_id)" json:"src_registry_id"`
DestRegistryID int64 `orm:"column(dest_registry_id)" json:"dest_registry_id"`
DestNamespace string `orm:"column(dest_namespace)" json:"dest_namespace"`
Override bool `orm:"column(override)" json:"override"`
Enabled bool `orm:"column(enabled)" json:"enabled"`
Trigger string `orm:"column(trigger)" json:"trigger"`
Filters string `orm:"column(filters)" json:"filters"`
ReplicateDeletion bool `orm:"column(replicate_deletion)" json:"replicate_deletion"`
CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"`
UpdateTime time.Time `orm:"column(update_time);auto_now" json:"update_time"`
}
// TableName set table name for ORM.
func (r *RepPolicy) TableName() string {
return "replication_policy"
}