1
0
api/ent/ogent/responses.go
2024-02-21 22:36:09 +09:00

1017 lines
24 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)
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)
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 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)
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)
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)
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)
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)
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 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
}