1308 lines
31 KiB
Go
1308 lines
31 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ogent
|
|
|
|
import "api/ent"
|
|
|
|
func NewCardCreate(e *ent.Card) *CardCreate {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret CardCreate
|
|
ret.ID = e.ID
|
|
ret.Card = NewOptInt(e.Card)
|
|
ret.Skill = NewOptString(e.Skill)
|
|
ret.Status = NewOptString(e.Status)
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
ret.URL = NewOptString(e.URL)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Author = NewOptString(e.Author)
|
|
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)
|
|
ret.Skill = NewOptString(e.Skill)
|
|
ret.Status = NewOptString(e.Status)
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
ret.URL = NewOptString(e.URL)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Author = NewOptString(e.Author)
|
|
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)
|
|
ret.Skill = NewOptString(e.Skill)
|
|
ret.Status = NewOptString(e.Status)
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
ret.URL = NewOptString(e.URL)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Author = NewOptString(e.Author)
|
|
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)
|
|
ret.Skill = NewOptString(e.Skill)
|
|
ret.Status = NewOptString(e.Status)
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
ret.URL = NewOptString(e.URL)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Author = NewOptString(e.Author)
|
|
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
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
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 {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]GroupRead, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewGroupRead(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
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
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
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
|
|
}
|
|
|
|
func NewMaCreate(e *ent.Ma) *MaCreate {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret MaCreate
|
|
ret.ID = e.ID
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Handle = NewOptString(e.Handle)
|
|
ret.Text = NewOptString(e.Text)
|
|
ret.Did = NewOptString(e.Did)
|
|
ret.Avatar = NewOptString(e.Avatar)
|
|
ret.Cid = NewOptString(e.Cid)
|
|
ret.URI = NewOptString(e.URI)
|
|
ret.Rkey = NewOptString(e.Rkey)
|
|
ret.BskyURL = NewOptString(e.BskyURL)
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewMaCreates(es []*ent.Ma) []MaCreate {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]MaCreate, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewMaCreate(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *MaCreate) Elem() MaCreate {
|
|
if m == nil {
|
|
return MaCreate{}
|
|
}
|
|
return *m
|
|
}
|
|
|
|
func NewMaList(e *ent.Ma) *MaList {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret MaList
|
|
ret.ID = e.ID
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Handle = NewOptString(e.Handle)
|
|
ret.Text = NewOptString(e.Text)
|
|
ret.Did = NewOptString(e.Did)
|
|
ret.Avatar = NewOptString(e.Avatar)
|
|
ret.Cid = NewOptString(e.Cid)
|
|
ret.URI = NewOptString(e.URI)
|
|
ret.Rkey = NewOptString(e.Rkey)
|
|
ret.BskyURL = NewOptString(e.BskyURL)
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewMaLists(es []*ent.Ma) []MaList {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]MaList, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewMaList(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *MaList) Elem() MaList {
|
|
if m == nil {
|
|
return MaList{}
|
|
}
|
|
return *m
|
|
}
|
|
|
|
func NewMaRead(e *ent.Ma) *MaRead {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret MaRead
|
|
ret.ID = e.ID
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Handle = NewOptString(e.Handle)
|
|
ret.Text = NewOptString(e.Text)
|
|
ret.Did = NewOptString(e.Did)
|
|
ret.Avatar = NewOptString(e.Avatar)
|
|
ret.Cid = NewOptString(e.Cid)
|
|
ret.URI = NewOptString(e.URI)
|
|
ret.Rkey = NewOptString(e.Rkey)
|
|
ret.BskyURL = NewOptString(e.BskyURL)
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewMaReads(es []*ent.Ma) []MaRead {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]MaRead, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewMaRead(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *MaRead) Elem() MaRead {
|
|
if m == nil {
|
|
return MaRead{}
|
|
}
|
|
return *m
|
|
}
|
|
|
|
func NewMaUpdate(e *ent.Ma) *MaUpdate {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret MaUpdate
|
|
ret.ID = e.ID
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Handle = NewOptString(e.Handle)
|
|
ret.Text = NewOptString(e.Text)
|
|
ret.Did = NewOptString(e.Did)
|
|
ret.Avatar = NewOptString(e.Avatar)
|
|
ret.Cid = NewOptString(e.Cid)
|
|
ret.URI = NewOptString(e.URI)
|
|
ret.Rkey = NewOptString(e.Rkey)
|
|
ret.BskyURL = NewOptString(e.BskyURL)
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewMaUpdates(es []*ent.Ma) []MaUpdate {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]MaUpdate, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewMaUpdate(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *MaUpdate) Elem() MaUpdate {
|
|
if m == nil {
|
|
return MaUpdate{}
|
|
}
|
|
return *m
|
|
}
|
|
|
|
func NewMaOwnerRead(e *ent.User) *MaOwnerRead {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret MaOwnerRead
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewMaOwnerReads(es []*ent.User) []MaOwnerRead {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]MaOwnerRead, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewMaOwnerRead(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (u *MaOwnerRead) Elem() MaOwnerRead {
|
|
if u == nil {
|
|
return MaOwnerRead{}
|
|
}
|
|
return *u
|
|
}
|
|
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
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
|
|
}
|
|
|
|
func NewUserCreate(e *ent.User) *UserCreate {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserCreate
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
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{}
|
|
}
|
|
return *u
|
|
}
|
|
|
|
func NewUserList(e *ent.User) *UserList {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserList
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewUserLists(es []*ent.User) []UserList {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]UserList, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewUserList(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (u *UserList) Elem() UserList {
|
|
if u == nil {
|
|
return UserList{}
|
|
}
|
|
return *u
|
|
}
|
|
|
|
func NewUserRead(e *ent.User) *UserRead {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserRead
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewUserReads(es []*ent.User) []UserRead {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]UserRead, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewUserRead(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (u *UserRead) Elem() UserRead {
|
|
if u == nil {
|
|
return UserRead{}
|
|
}
|
|
return *u
|
|
}
|
|
|
|
func NewUserUpdate(e *ent.User) *UserUpdate {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserUpdate
|
|
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)
|
|
ret.Coin = NewOptInt(e.Coin)
|
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewUserUpdates(es []*ent.User) []UserUpdate {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]UserUpdate, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewUserUpdate(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (u *UserUpdate) Elem() UserUpdate {
|
|
if u == nil {
|
|
return UserUpdate{}
|
|
}
|
|
return *u
|
|
}
|
|
|
|
func NewUserCardList(e *ent.Card) *UserCardList {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserCardList
|
|
ret.ID = e.ID
|
|
ret.Card = NewOptInt(e.Card)
|
|
ret.Skill = NewOptString(e.Skill)
|
|
ret.Status = NewOptString(e.Status)
|
|
ret.Cp = NewOptInt(e.Cp)
|
|
ret.URL = NewOptString(e.URL)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Author = NewOptString(e.Author)
|
|
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
|
|
}
|
|
|
|
func NewUserMaList(e *ent.Ma) *UserMaList {
|
|
if e == nil {
|
|
return nil
|
|
}
|
|
var ret UserMaList
|
|
ret.ID = e.ID
|
|
ret.Limit = NewOptBool(e.Limit)
|
|
ret.Count = NewOptInt(e.Count)
|
|
ret.Handle = NewOptString(e.Handle)
|
|
ret.Text = NewOptString(e.Text)
|
|
ret.Did = NewOptString(e.Did)
|
|
ret.Avatar = NewOptString(e.Avatar)
|
|
ret.Cid = NewOptString(e.Cid)
|
|
ret.URI = NewOptString(e.URI)
|
|
ret.Rkey = NewOptString(e.Rkey)
|
|
ret.BskyURL = NewOptString(e.BskyURL)
|
|
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
|
return &ret
|
|
}
|
|
|
|
func NewUserMaLists(es []*ent.Ma) []UserMaList {
|
|
if len(es) == 0 {
|
|
return nil
|
|
}
|
|
r := make([]UserMaList, len(es))
|
|
for i, e := range es {
|
|
r[i] = NewUserMaList(e).Elem()
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *UserMaList) Elem() UserMaList {
|
|
if m == nil {
|
|
return UserMaList{}
|
|
}
|
|
return *m
|
|
}
|
|
|
|
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
|
|
}
|