2023-07-09 06:06:53 +00:00
|
|
|
package domain
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type Ennoblement struct {
|
2024-05-02 05:57:24 +00:00
|
|
|
ID int
|
2023-07-09 06:06:53 +00:00
|
|
|
Village VillageMeta
|
2024-05-02 05:57:24 +00:00
|
|
|
NewOwner PlayerMeta
|
2023-07-09 06:06:53 +00:00
|
|
|
CreatedAt time.Time
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e Ennoblement) IsBarbarian() bool {
|
|
|
|
return !e.Village.Player.Valid
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e Ennoblement) IsSelfConquer() bool {
|
2024-05-02 05:57:24 +00:00
|
|
|
return e.NewOwner.ID == e.Village.Player.Player.ID
|
2023-07-09 06:06:53 +00:00
|
|
|
}
|