2022-08-31 07:49:08 +00:00
|
|
|
// Code generated by ent, DO NOT EDIT.
|
2022-08-31 06:18:14 +00:00
|
|
|
|
|
|
|
package ogent
|
|
|
|
|
2024-02-21 09:16:45 +00:00
|
|
|
import "api/ent"
|
2022-08-31 06:18:14 +00:00
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func NewCardCreate(e *ent.Card) *CardCreate {
|
2022-08-31 06:18:14 +00:00
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
var ret CardCreate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
2023-05-03 10:16:36 +00:00
|
|
|
ret.Skill = NewOptString(e.Skill)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Status = NewOptString(e.Status)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.URL = NewOptString(e.URL)
|
2023-08-21 13:13:44 +00:00
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardCreates(es []*ent.Card) []CardCreate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]CardCreate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewCardCreate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CardCreate) Elem() CardCreate {
|
|
|
|
if c == nil {
|
|
|
|
return CardCreate{}
|
|
|
|
}
|
|
|
|
return *c
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardList(e *ent.Card) *CardList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret CardList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
2023-05-03 10:16:36 +00:00
|
|
|
ret.Skill = NewOptString(e.Skill)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Status = NewOptString(e.Status)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.URL = NewOptString(e.URL)
|
2023-08-21 13:13:44 +00:00
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardLists(es []*ent.Card) []CardList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]CardList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewCardList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CardList) Elem() CardList {
|
|
|
|
if c == nil {
|
|
|
|
return CardList{}
|
|
|
|
}
|
|
|
|
return *c
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardRead(e *ent.Card) *CardRead {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret CardRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
2023-05-03 10:16:36 +00:00
|
|
|
ret.Skill = NewOptString(e.Skill)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Status = NewOptString(e.Status)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.URL = NewOptString(e.URL)
|
2023-08-21 13:13:44 +00:00
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardReads(es []*ent.Card) []CardRead {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]CardRead, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewCardRead(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CardRead) Elem() CardRead {
|
|
|
|
if c == nil {
|
|
|
|
return CardRead{}
|
|
|
|
}
|
|
|
|
return *c
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardUpdate(e *ent.Card) *CardUpdate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret CardUpdate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
2023-05-03 10:16:36 +00:00
|
|
|
ret.Skill = NewOptString(e.Skill)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Status = NewOptString(e.Status)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.URL = NewOptString(e.URL)
|
2023-08-21 13:13:44 +00:00
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardUpdates(es []*ent.Card) []CardUpdate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]CardUpdate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewCardUpdate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CardUpdate) Elem() CardUpdate {
|
|
|
|
if c == nil {
|
|
|
|
return CardUpdate{}
|
|
|
|
}
|
|
|
|
return *c
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardOwnerRead(e *ent.User) *CardOwnerRead {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret CardOwnerRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCardOwnerReads(es []*ent.User) []CardOwnerRead {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]CardOwnerRead, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewCardOwnerRead(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *CardOwnerRead) Elem() CardOwnerRead {
|
|
|
|
if u == nil {
|
|
|
|
return CardOwnerRead{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupCreate(e *ent.Group) *GroupCreate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret GroupCreate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Name = e.Name
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupCreates(es []*ent.Group) []GroupCreate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]GroupCreate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewGroupCreate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gr *GroupCreate) Elem() GroupCreate {
|
|
|
|
if gr == nil {
|
|
|
|
return GroupCreate{}
|
|
|
|
}
|
|
|
|
return *gr
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupList(e *ent.Group) *GroupList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret GroupList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Name = e.Name
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupLists(es []*ent.Group) []GroupList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]GroupList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewGroupList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gr *GroupList) Elem() GroupList {
|
|
|
|
if gr == nil {
|
|
|
|
return GroupList{}
|
|
|
|
}
|
|
|
|
return *gr
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupRead(e *ent.Group) *GroupRead {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret GroupRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Name = e.Name
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupReads(es []*ent.Group) []GroupRead {
|
2022-08-31 06:18:14 +00:00
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
r := make([]GroupRead, len(es))
|
2022-08-31 06:18:14 +00:00
|
|
|
for i, e := range es {
|
2022-08-31 07:49:08 +00:00
|
|
|
r[i] = NewGroupRead(e).Elem()
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func (gr *GroupRead) Elem() GroupRead {
|
|
|
|
if gr == nil {
|
|
|
|
return GroupRead{}
|
|
|
|
}
|
|
|
|
return *gr
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupUpdate(e *ent.Group) *GroupUpdate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret GroupUpdate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Name = e.Name
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupUpdates(es []*ent.Group) []GroupUpdate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]GroupUpdate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewGroupUpdate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gr *GroupUpdate) Elem() GroupUpdate {
|
|
|
|
if gr == nil {
|
|
|
|
return GroupUpdate{}
|
|
|
|
}
|
|
|
|
return *gr
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupUsersList(e *ent.User) *GroupUsersList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret GroupUsersList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewGroupUsersLists(es []*ent.User) []GroupUsersList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]GroupUsersList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewGroupUsersList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *GroupUsersList) Elem() GroupUsersList {
|
|
|
|
if u == nil {
|
|
|
|
return GroupUsersList{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
2024-02-03 06:48:28 +00:00
|
|
|
func NewUeCreate(e *ent.Ue) *UeCreate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UeCreate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
|
|
ret.LimitBoss = NewOptBool(e.LimitBoss)
|
|
|
|
ret.LimitItem = NewOptBool(e.LimitItem)
|
|
|
|
ret.Lv = NewOptInt(e.Lv)
|
|
|
|
ret.LvPoint = NewOptInt(e.LvPoint)
|
|
|
|
ret.Model = NewOptInt(e.Model)
|
|
|
|
ret.Sword = NewOptInt(e.Sword)
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
|
|
|
ret.Mode = NewOptString(e.Mode)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.LocationX = NewOptInt(e.LocationX)
|
|
|
|
ret.LocationY = NewOptInt(e.LocationY)
|
|
|
|
ret.LocationZ = NewOptInt(e.LocationZ)
|
|
|
|
ret.LocationN = NewOptInt(e.LocationN)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeCreates(es []*ent.Ue) []UeCreate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UeCreate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUeCreate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UeCreate) Elem() UeCreate {
|
|
|
|
if u == nil {
|
|
|
|
return UeCreate{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeList(e *ent.Ue) *UeList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UeList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
|
|
ret.LimitBoss = NewOptBool(e.LimitBoss)
|
|
|
|
ret.LimitItem = NewOptBool(e.LimitItem)
|
|
|
|
ret.Lv = NewOptInt(e.Lv)
|
|
|
|
ret.LvPoint = NewOptInt(e.LvPoint)
|
|
|
|
ret.Model = NewOptInt(e.Model)
|
|
|
|
ret.Sword = NewOptInt(e.Sword)
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
|
|
|
ret.Mode = NewOptString(e.Mode)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.LocationX = NewOptInt(e.LocationX)
|
|
|
|
ret.LocationY = NewOptInt(e.LocationY)
|
|
|
|
ret.LocationZ = NewOptInt(e.LocationZ)
|
|
|
|
ret.LocationN = NewOptInt(e.LocationN)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeLists(es []*ent.Ue) []UeList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UeList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUeList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UeList) Elem() UeList {
|
|
|
|
if u == nil {
|
|
|
|
return UeList{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeRead(e *ent.Ue) *UeRead {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UeRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
|
|
ret.LimitBoss = NewOptBool(e.LimitBoss)
|
|
|
|
ret.LimitItem = NewOptBool(e.LimitItem)
|
|
|
|
ret.Lv = NewOptInt(e.Lv)
|
|
|
|
ret.LvPoint = NewOptInt(e.LvPoint)
|
|
|
|
ret.Model = NewOptInt(e.Model)
|
|
|
|
ret.Sword = NewOptInt(e.Sword)
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
|
|
|
ret.Mode = NewOptString(e.Mode)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.LocationX = NewOptInt(e.LocationX)
|
|
|
|
ret.LocationY = NewOptInt(e.LocationY)
|
|
|
|
ret.LocationZ = NewOptInt(e.LocationZ)
|
|
|
|
ret.LocationN = NewOptInt(e.LocationN)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeReads(es []*ent.Ue) []UeRead {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UeRead, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUeRead(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UeRead) Elem() UeRead {
|
|
|
|
if u == nil {
|
|
|
|
return UeRead{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeUpdate(e *ent.Ue) *UeUpdate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UeUpdate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
|
|
ret.LimitBoss = NewOptBool(e.LimitBoss)
|
|
|
|
ret.LimitItem = NewOptBool(e.LimitItem)
|
|
|
|
ret.Lv = NewOptInt(e.Lv)
|
|
|
|
ret.LvPoint = NewOptInt(e.LvPoint)
|
|
|
|
ret.Model = NewOptInt(e.Model)
|
|
|
|
ret.Sword = NewOptInt(e.Sword)
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
|
|
|
ret.Mode = NewOptString(e.Mode)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.LocationX = NewOptInt(e.LocationX)
|
|
|
|
ret.LocationY = NewOptInt(e.LocationY)
|
|
|
|
ret.LocationZ = NewOptInt(e.LocationZ)
|
|
|
|
ret.LocationN = NewOptInt(e.LocationN)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeUpdates(es []*ent.Ue) []UeUpdate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UeUpdate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUeUpdate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UeUpdate) Elem() UeUpdate {
|
|
|
|
if u == nil {
|
|
|
|
return UeUpdate{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeOwnerRead(e *ent.User) *UeOwnerRead {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UeOwnerRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
|
|
|
ret.Did = NewOptString(e.Did)
|
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
|
|
|
ret.Next = NewOptString(e.Next)
|
|
|
|
ret.Room = NewOptInt(e.Room)
|
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2024-02-03 06:48:28 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUeOwnerReads(es []*ent.User) []UeOwnerRead {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UeOwnerRead, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUeOwnerRead(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UeOwnerRead) Elem() UeOwnerRead {
|
|
|
|
if u == nil {
|
|
|
|
return UeOwnerRead{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func NewUserCreate(e *ent.User) *UserCreate {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UserCreate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserCreates(es []*ent.User) []UserCreate {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UserCreate, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUserCreate(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UserCreate) Elem() UserCreate {
|
|
|
|
if u == nil {
|
|
|
|
return UserCreate{}
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func NewUserList(e *ent.User) *UserList {
|
2022-08-31 06:18:14 +00:00
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
var ret UserList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserLists(es []*ent.User) []UserList {
|
2022-08-31 06:18:14 +00:00
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
r := make([]UserList, len(es))
|
2022-08-31 06:18:14 +00:00
|
|
|
for i, e := range es {
|
2022-08-31 07:49:08 +00:00
|
|
|
r[i] = NewUserList(e).Elem()
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func (u *UserList) Elem() UserList {
|
|
|
|
if u == nil {
|
|
|
|
return UserList{}
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func NewUserRead(e *ent.User) *UserRead {
|
2022-08-31 06:18:14 +00:00
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
var ret UserRead
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserReads(es []*ent.User) []UserRead {
|
2022-08-31 06:18:14 +00:00
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
r := make([]UserRead, len(es))
|
2022-08-31 06:18:14 +00:00
|
|
|
for i, e := range es {
|
2022-08-31 07:49:08 +00:00
|
|
|
r[i] = NewUserRead(e).Elem()
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func (u *UserRead) Elem() UserRead {
|
|
|
|
if u == nil {
|
|
|
|
return UserRead{}
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func NewUserUpdate(e *ent.User) *UserUpdate {
|
2022-08-31 06:18:14 +00:00
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
var ret UserUpdate
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Username = e.Username
|
2023-04-13 07:50:11 +00:00
|
|
|
ret.Did = NewOptString(e.Did)
|
2023-07-20 14:18:17 +00:00
|
|
|
ret.Member = NewOptBool(e.Member)
|
|
|
|
ret.Book = NewOptBool(e.Book)
|
|
|
|
ret.Manga = NewOptBool(e.Manga)
|
|
|
|
ret.Badge = NewOptBool(e.Badge)
|
2023-07-10 03:43:09 +00:00
|
|
|
ret.Bsky = NewOptBool(e.Bsky)
|
|
|
|
ret.Mastodon = NewOptBool(e.Mastodon)
|
2023-05-01 14:00:17 +00:00
|
|
|
ret.Delete = NewOptBool(e.Delete)
|
2023-06-21 01:17:52 +00:00
|
|
|
ret.Handle = NewOptBool(e.Handle)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.RaidAt = NewOptDateTime(e.RaidAt)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.ServerAt = NewOptDateTime(e.ServerAt)
|
2023-07-23 14:40:24 +00:00
|
|
|
ret.EggAt = NewOptDateTime(e.EggAt)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Luck = NewOptInt(e.Luck)
|
|
|
|
ret.LuckAt = NewOptDateTime(e.LuckAt)
|
|
|
|
ret.Like = NewOptInt(e.Like)
|
|
|
|
ret.LikeRank = NewOptInt(e.LikeRank)
|
|
|
|
ret.LikeAt = NewOptDateTime(e.LikeAt)
|
2023-07-01 14:21:48 +00:00
|
|
|
ret.Fav = NewOptInt(e.Fav)
|
2023-05-24 09:36:44 +00:00
|
|
|
ret.Ten = NewOptBool(e.Ten)
|
|
|
|
ret.TenSu = NewOptInt(e.TenSu)
|
|
|
|
ret.TenKai = NewOptInt(e.TenKai)
|
|
|
|
ret.Aiten = NewOptInt(e.Aiten)
|
|
|
|
ret.TenCard = NewOptString(e.TenCard)
|
|
|
|
ret.TenDelete = NewOptString(e.TenDelete)
|
|
|
|
ret.TenPost = NewOptString(e.TenPost)
|
|
|
|
ret.TenGet = NewOptString(e.TenGet)
|
|
|
|
ret.TenAt = NewOptDateTime(e.TenAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Next = NewOptString(e.Next)
|
2023-09-10 08:53:30 +00:00
|
|
|
ret.Room = NewOptInt(e.Room)
|
2023-11-03 02:24:42 +00:00
|
|
|
ret.Model = NewOptBool(e.Model)
|
|
|
|
ret.ModelAt = NewOptDateTime(e.ModelAt)
|
|
|
|
ret.ModelAttack = NewOptInt(e.ModelAttack)
|
|
|
|
ret.ModelLimit = NewOptInt(e.ModelLimit)
|
|
|
|
ret.ModelSkill = NewOptInt(e.ModelSkill)
|
|
|
|
ret.ModelMode = NewOptInt(e.ModelMode)
|
|
|
|
ret.ModelCritical = NewOptInt(e.ModelCritical)
|
|
|
|
ret.ModelCriticalD = NewOptInt(e.ModelCriticalD)
|
|
|
|
ret.Game = NewOptBool(e.Game)
|
|
|
|
ret.GameTest = NewOptBool(e.GameTest)
|
|
|
|
ret.GameEnd = NewOptBool(e.GameEnd)
|
|
|
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
|
|
|
ret.GameLv = NewOptInt(e.GameLv)
|
2024-02-21 19:08:34 +00:00
|
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
2022-08-31 07:49:08 +00:00
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserUpdates(es []*ent.User) []UserUpdate {
|
2022-08-31 06:18:14 +00:00
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
r := make([]UserUpdate, len(es))
|
2022-08-31 06:18:14 +00:00
|
|
|
for i, e := range es {
|
2022-08-31 07:49:08 +00:00
|
|
|
r[i] = NewUserUpdate(e).Elem()
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2022-08-31 07:49:08 +00:00
|
|
|
func (u *UserUpdate) Elem() UserUpdate {
|
|
|
|
if u == nil {
|
|
|
|
return UserUpdate{}
|
2022-08-31 06:18:14 +00:00
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|
2022-08-31 07:49:08 +00:00
|
|
|
|
|
|
|
func NewUserCardList(e *ent.Card) *UserCardList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UserCardList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
2023-05-03 10:16:36 +00:00
|
|
|
ret.Skill = NewOptString(e.Skill)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.Status = NewOptString(e.Status)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.URL = NewOptString(e.URL)
|
2023-08-21 13:13:44 +00:00
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
2022-08-31 07:49:08 +00:00
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserCardLists(es []*ent.Card) []UserCardList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UserCardList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUserCardList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *UserCardList) Elem() UserCardList {
|
|
|
|
if c == nil {
|
|
|
|
return UserCardList{}
|
|
|
|
}
|
|
|
|
return *c
|
|
|
|
}
|
2024-02-03 06:48:28 +00:00
|
|
|
|
|
|
|
func NewUserUeList(e *ent.Ue) *UserUeList {
|
|
|
|
if e == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
var ret UserUeList
|
|
|
|
ret.ID = e.ID
|
|
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
|
|
ret.LimitBoss = NewOptBool(e.LimitBoss)
|
|
|
|
ret.LimitItem = NewOptBool(e.LimitItem)
|
|
|
|
ret.Lv = NewOptInt(e.Lv)
|
|
|
|
ret.LvPoint = NewOptInt(e.LvPoint)
|
|
|
|
ret.Model = NewOptInt(e.Model)
|
|
|
|
ret.Sword = NewOptInt(e.Sword)
|
|
|
|
ret.Card = NewOptInt(e.Card)
|
|
|
|
ret.Mode = NewOptString(e.Mode)
|
|
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
|
|
ret.Count = NewOptInt(e.Count)
|
|
|
|
ret.LocationX = NewOptInt(e.LocationX)
|
|
|
|
ret.LocationY = NewOptInt(e.LocationY)
|
|
|
|
ret.LocationZ = NewOptInt(e.LocationZ)
|
|
|
|
ret.LocationN = NewOptInt(e.LocationN)
|
|
|
|
ret.Author = NewOptString(e.Author)
|
|
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
|
|
return &ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUserUeLists(es []*ent.Ue) []UserUeList {
|
|
|
|
if len(es) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
r := make([]UserUeList, len(es))
|
|
|
|
for i, e := range es {
|
|
|
|
r[i] = NewUserUeList(e).Elem()
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *UserUeList) Elem() UserUeList {
|
|
|
|
if u == nil {
|
|
|
|
return UserUeList{}
|
|
|
|
}
|
|
|
|
return *u
|
|
|
|
}
|