generated from cokeroluwafemi/gosaic
/
macro.go
54 lines (42 loc) · 946 Bytes
/
macro.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
package model
type Macro struct {
Id int64 `db:"id"`
AspectId int64 `db:"aspect_id"`
CoverId int64 `db:"cover_id"`
Path string `db:"path"`
Md5sum string `db:"md5sum"`
Width int `db:"width"`
Height int `db:"height"`
Orientation int `db:"orientation"`
}
// implement Image interface
func (g *Macro) GetPath() string {
return g.Path
}
func (g *Macro) GetMd5sum() string {
return g.Md5sum
}
func (g *Macro) GetWidth() int {
return g.Width
}
func (g *Macro) GetHeight() int {
return g.Height
}
func (g *Macro) GetOrientation() int {
return g.Orientation
}
func (g *Macro) SetPath(path string) {
g.Path = path
}
func (g *Macro) SetMd5sum(md5sum string) {
g.Md5sum = md5sum
}
func (g *Macro) SetWidth(width int) {
g.Width = width
}
func (g *Macro) SetHeight(height int) {
g.Height = height
}
func (g *Macro) SetOrientation(orientation int) {
g.Orientation = orientation
}