/
ManyToManyTables.go
63 lines (48 loc) · 1.37 KB
/
ManyToManyTables.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
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
package utilities
type SectorToSystemLink struct {
Id int64 `sql:"id"`
ParentId int64 `sql:"asset_sector_id"`
ChildId int64 `sql:"asset_system_id"`
}
func (link *SectorToSystemLink) TableName(linkType string) string {
return "plan_asset_sector_systems"
}
func (link *SectorToSystemLink) GetId() *int64 {
return &link.Id
}
//
type StarClusterToDetailLink struct {
Id int64 `sql:"id"`
ParentId int64 `sql:"asset_star_cluster_id"`
ChildId int64 `sql:"detail_id"`
}
func (link *StarClusterToDetailLink) TableName(linkType string) string {
return "plan_asset_star_cluster_stars"
}
func (link *StarClusterToDetailLink) GetId() *int64 {
return &link.Id
}
//
type SystemToDetailLink struct {
Id int64 `sql:"id"`
ParentId int64 `sql:"asset_system_id"`
ChildId int64 `sql:"detail_id"`
}
func (link *SystemToDetailLink) TableName(linkType string) string {
return "plan_asset_system_details"
}
func (link *SystemToDetailLink) GetId() *int64 {
return &link.Id
}
//
type SystemToStarClusterLink struct {
Id int64 `sql:"id"`
ParentId int64 `sql:"asset_system_id"`
ChildId int64 `sql:"asset_star_cluster_id"`
}
func (link *SystemToStarClusterLink) TableName(linkType string) string {
return "plan_asset_system_star_clusters"
}
func (link *SystemToStarClusterLink) GetId() *int64 {
return &link.Id
}