-
Notifications
You must be signed in to change notification settings - Fork 463
/
name_stroke.go
47 lines (41 loc) · 1020 Bytes
/
name_stroke.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
package fate
// NameStroke ...
type NameStroke struct {
// ID bson.ObjectId `bson:"_id,omitempty"`
Last1 int `bson:"last_1"`
Last2 int `bson:"last_2"`
First1 int `bson:"first_1"`
First2 int `bson:"first_2"`
}
type nameStroke struct {
*NameStroke
*SanCai
*WuGe
}
// SanCaiWuGe ...
type SanCaiWuGe interface {
}
// SanCaiWuGe 三才五格
func (s *NameStroke) SanCaiWuGe() SanCaiWuGe {
l1, l2, f1, f2 := s.Last1, s.Last2, s.First1, s.First2
wuGe := &WuGe{
tianGe: tianGe(l1, l2, f1, f2),
renGe: renGe(l1, l2, f1, f2),
diGe: diGe(l1, l2, f1, f2),
waiGe: waiGe(l1, l2, f1, f2),
zongGe: zongGe(l1, l2, f1, f2),
}
sanCai := &SanCai{
tianCai: sanCaiAttr(wuGe.TianGe()),
tianCaiYinYang: yinYangAttr(wuGe.TianGe()),
renCai: sanCaiAttr(wuGe.RenGe()),
renCaiYinYang: yinYangAttr(wuGe.RenGe()),
diCai: sanCaiAttr(wuGe.DiGe()),
diCaiYingYang: yinYangAttr(wuGe.DiGe()),
}
return &nameStroke{
NameStroke: s,
SanCai: sanCai,
WuGe: wuGe,
}
}