Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type ChatBan
- func (_m *ChatBan) QueryBannedByUser() *UserQuery
- func (_m *ChatBan) QueryRoom() *ChatRoomQuery
- func (_m *ChatBan) QueryUser() *UserQuery
- func (_m *ChatBan) String() string
- func (_m *ChatBan) Unwrap() *ChatBan
- func (_m *ChatBan) Update() *ChatBanUpdateOne
- func (_m *ChatBan) Value(name string) (ent.Value, error)
- type ChatBanClient
- func (c *ChatBanClient) Create() *ChatBanCreate
- func (c *ChatBanClient) CreateBulk(builders ...*ChatBanCreate) *ChatBanCreateBulk
- func (c *ChatBanClient) Delete() *ChatBanDelete
- func (c *ChatBanClient) DeleteOne(_m *ChatBan) *ChatBanDeleteOne
- func (c *ChatBanClient) DeleteOneID(id int) *ChatBanDeleteOne
- func (c *ChatBanClient) Get(ctx context.Context, id int) (*ChatBan, error)
- func (c *ChatBanClient) GetX(ctx context.Context, id int) *ChatBan
- func (c *ChatBanClient) Hooks() []Hook
- func (c *ChatBanClient) Intercept(interceptors ...Interceptor)
- func (c *ChatBanClient) Interceptors() []Interceptor
- func (c *ChatBanClient) MapCreateBulk(slice any, setFunc func(*ChatBanCreate, int)) *ChatBanCreateBulk
- func (c *ChatBanClient) Query() *ChatBanQuery
- func (c *ChatBanClient) QueryBannedByUser(_m *ChatBan) *UserQuery
- func (c *ChatBanClient) QueryRoom(_m *ChatBan) *ChatRoomQuery
- func (c *ChatBanClient) QueryUser(_m *ChatBan) *UserQuery
- func (c *ChatBanClient) Update() *ChatBanUpdate
- func (c *ChatBanClient) UpdateOne(_m *ChatBan) *ChatBanUpdateOne
- func (c *ChatBanClient) UpdateOneID(id int) *ChatBanUpdateOne
- func (c *ChatBanClient) Use(hooks ...Hook)
- type ChatBanCreate
- func (_c *ChatBanCreate) Exec(ctx context.Context) error
- func (_c *ChatBanCreate) ExecX(ctx context.Context)
- func (_c *ChatBanCreate) Mutation() *ChatBanMutation
- func (_c *ChatBanCreate) Save(ctx context.Context) (*ChatBan, error)
- func (_c *ChatBanCreate) SaveX(ctx context.Context) *ChatBan
- func (_c *ChatBanCreate) SetBannedByUser(v *User) *ChatBanCreate
- func (_c *ChatBanCreate) SetBannedByUserID(id int) *ChatBanCreate
- func (_c *ChatBanCreate) SetCreatedAt(v time.Time) *ChatBanCreate
- func (_c *ChatBanCreate) SetIPHash(v string) *ChatBanCreate
- func (_c *ChatBanCreate) SetNillableCreatedAt(v *time.Time) *ChatBanCreate
- func (_c *ChatBanCreate) SetNillableIPHash(v *string) *ChatBanCreate
- func (_c *ChatBanCreate) SetNillableReason(v *string) *ChatBanCreate
- func (_c *ChatBanCreate) SetNillableUserID(id *int) *ChatBanCreate
- func (_c *ChatBanCreate) SetReason(v string) *ChatBanCreate
- func (_c *ChatBanCreate) SetRoom(v *ChatRoom) *ChatBanCreate
- func (_c *ChatBanCreate) SetRoomID(id int) *ChatBanCreate
- func (_c *ChatBanCreate) SetUser(v *User) *ChatBanCreate
- func (_c *ChatBanCreate) SetUserID(id int) *ChatBanCreate
- type ChatBanCreateBulk
- type ChatBanDelete
- type ChatBanDeleteOne
- type ChatBanEdges
- type ChatBanGroupBy
- func (_g *ChatBanGroupBy) Aggregate(fns ...AggregateFunc) *ChatBanGroupBy
- func (s *ChatBanGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatBanGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatBanGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatBanGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatBanGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatBanGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatBanGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatBanGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatBanGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatBanGroupBy) IntX(ctx context.Context) int
- func (s *ChatBanGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatBanGroupBy) IntsX(ctx context.Context) []int
- func (_g *ChatBanGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatBanGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatBanGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatBanGroupBy) StringX(ctx context.Context) string
- func (s *ChatBanGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatBanGroupBy) StringsX(ctx context.Context) []string
- type ChatBanMutation
- func (m *ChatBanMutation) AddField(name string, value ent.Value) error
- func (m *ChatBanMutation) AddedEdges() []string
- func (m *ChatBanMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatBanMutation) AddedFields() []string
- func (m *ChatBanMutation) AddedIDs(name string) []ent.Value
- func (m *ChatBanMutation) BannedByUserCleared() bool
- func (m *ChatBanMutation) BannedByUserID() (id int, exists bool)
- func (m *ChatBanMutation) BannedByUserIDs() (ids []int)
- func (m *ChatBanMutation) ClearBannedByUser()
- func (m *ChatBanMutation) ClearEdge(name string) error
- func (m *ChatBanMutation) ClearField(name string) error
- func (m *ChatBanMutation) ClearIPHash()
- func (m *ChatBanMutation) ClearReason()
- func (m *ChatBanMutation) ClearRoom()
- func (m *ChatBanMutation) ClearUser()
- func (m *ChatBanMutation) ClearedEdges() []string
- func (m *ChatBanMutation) ClearedFields() []string
- func (m ChatBanMutation) Client() *Client
- func (m *ChatBanMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChatBanMutation) EdgeCleared(name string) bool
- func (m *ChatBanMutation) Field(name string) (ent.Value, bool)
- func (m *ChatBanMutation) FieldCleared(name string) bool
- func (m *ChatBanMutation) Fields() []string
- func (m *ChatBanMutation) ID() (id int, exists bool)
- func (m *ChatBanMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChatBanMutation) IPHash() (r string, exists bool)
- func (m *ChatBanMutation) IPHashCleared() bool
- func (m *ChatBanMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatBanMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatBanMutation) OldIPHash(ctx context.Context) (v string, err error)
- func (m *ChatBanMutation) OldReason(ctx context.Context) (v string, err error)
- func (m *ChatBanMutation) Op() Op
- func (m *ChatBanMutation) Reason() (r string, exists bool)
- func (m *ChatBanMutation) ReasonCleared() bool
- func (m *ChatBanMutation) RemovedEdges() []string
- func (m *ChatBanMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatBanMutation) ResetBannedByUser()
- func (m *ChatBanMutation) ResetCreatedAt()
- func (m *ChatBanMutation) ResetEdge(name string) error
- func (m *ChatBanMutation) ResetField(name string) error
- func (m *ChatBanMutation) ResetIPHash()
- func (m *ChatBanMutation) ResetReason()
- func (m *ChatBanMutation) ResetRoom()
- func (m *ChatBanMutation) ResetUser()
- func (m *ChatBanMutation) RoomCleared() bool
- func (m *ChatBanMutation) RoomID() (id int, exists bool)
- func (m *ChatBanMutation) RoomIDs() (ids []int)
- func (m *ChatBanMutation) SetBannedByUserID(id int)
- func (m *ChatBanMutation) SetCreatedAt(t time.Time)
- func (m *ChatBanMutation) SetField(name string, value ent.Value) error
- func (m *ChatBanMutation) SetIPHash(s string)
- func (m *ChatBanMutation) SetOp(op Op)
- func (m *ChatBanMutation) SetReason(s string)
- func (m *ChatBanMutation) SetRoomID(id int)
- func (m *ChatBanMutation) SetUserID(id int)
- func (m ChatBanMutation) Tx() (*Tx, error)
- func (m *ChatBanMutation) Type() string
- func (m *ChatBanMutation) UserCleared() bool
- func (m *ChatBanMutation) UserID() (id int, exists bool)
- func (m *ChatBanMutation) UserIDs() (ids []int)
- func (m *ChatBanMutation) Where(ps ...predicate.ChatBan)
- func (m *ChatBanMutation) WhereP(ps ...func(*sql.Selector))
- type ChatBanQuery
- func (_q *ChatBanQuery) Aggregate(fns ...AggregateFunc) *ChatBanSelect
- func (_q *ChatBanQuery) All(ctx context.Context) ([]*ChatBan, error)
- func (_q *ChatBanQuery) AllX(ctx context.Context) []*ChatBan
- func (_q *ChatBanQuery) Clone() *ChatBanQuery
- func (_q *ChatBanQuery) Count(ctx context.Context) (int, error)
- func (_q *ChatBanQuery) CountX(ctx context.Context) int
- func (_q *ChatBanQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ChatBanQuery) ExistX(ctx context.Context) bool
- func (_q *ChatBanQuery) First(ctx context.Context) (*ChatBan, error)
- func (_q *ChatBanQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ChatBanQuery) FirstIDX(ctx context.Context) int
- func (_q *ChatBanQuery) FirstX(ctx context.Context) *ChatBan
- func (_q *ChatBanQuery) GroupBy(field string, fields ...string) *ChatBanGroupBy
- func (_q *ChatBanQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ChatBanQuery) IDsX(ctx context.Context) []int
- func (_q *ChatBanQuery) Limit(limit int) *ChatBanQuery
- func (_q *ChatBanQuery) Offset(offset int) *ChatBanQuery
- func (_q *ChatBanQuery) Only(ctx context.Context) (*ChatBan, error)
- func (_q *ChatBanQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ChatBanQuery) OnlyIDX(ctx context.Context) int
- func (_q *ChatBanQuery) OnlyX(ctx context.Context) *ChatBan
- func (_q *ChatBanQuery) Order(o ...chatban.OrderOption) *ChatBanQuery
- func (_q *ChatBanQuery) QueryBannedByUser() *UserQuery
- func (_q *ChatBanQuery) QueryRoom() *ChatRoomQuery
- func (_q *ChatBanQuery) QueryUser() *UserQuery
- func (_q *ChatBanQuery) Select(fields ...string) *ChatBanSelect
- func (_q *ChatBanQuery) Unique(unique bool) *ChatBanQuery
- func (_q *ChatBanQuery) Where(ps ...predicate.ChatBan) *ChatBanQuery
- func (_q *ChatBanQuery) WithBannedByUser(opts ...func(*UserQuery)) *ChatBanQuery
- func (_q *ChatBanQuery) WithRoom(opts ...func(*ChatRoomQuery)) *ChatBanQuery
- func (_q *ChatBanQuery) WithUser(opts ...func(*UserQuery)) *ChatBanQuery
- type ChatBanSelect
- func (_s *ChatBanSelect) Aggregate(fns ...AggregateFunc) *ChatBanSelect
- func (s *ChatBanSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatBanSelect) BoolX(ctx context.Context) bool
- func (s *ChatBanSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatBanSelect) BoolsX(ctx context.Context) []bool
- func (s *ChatBanSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatBanSelect) Float64X(ctx context.Context) float64
- func (s *ChatBanSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatBanSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatBanSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatBanSelect) IntX(ctx context.Context) int
- func (s *ChatBanSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatBanSelect) IntsX(ctx context.Context) []int
- func (_s *ChatBanSelect) Scan(ctx context.Context, v any) error
- func (s *ChatBanSelect) ScanX(ctx context.Context, v any)
- func (s *ChatBanSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatBanSelect) StringX(ctx context.Context) string
- func (s *ChatBanSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatBanSelect) StringsX(ctx context.Context) []string
- type ChatBanUpdate
- func (_u *ChatBanUpdate) ClearBannedByUser() *ChatBanUpdate
- func (_u *ChatBanUpdate) ClearIPHash() *ChatBanUpdate
- func (_u *ChatBanUpdate) ClearReason() *ChatBanUpdate
- func (_u *ChatBanUpdate) ClearRoom() *ChatBanUpdate
- func (_u *ChatBanUpdate) ClearUser() *ChatBanUpdate
- func (_u *ChatBanUpdate) Exec(ctx context.Context) error
- func (_u *ChatBanUpdate) ExecX(ctx context.Context)
- func (_u *ChatBanUpdate) Mutation() *ChatBanMutation
- func (_u *ChatBanUpdate) Save(ctx context.Context) (int, error)
- func (_u *ChatBanUpdate) SaveX(ctx context.Context) int
- func (_u *ChatBanUpdate) SetBannedByUser(v *User) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetBannedByUserID(id int) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetIPHash(v string) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetNillableIPHash(v *string) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetNillableReason(v *string) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetNillableUserID(id *int) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetReason(v string) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetRoom(v *ChatRoom) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetRoomID(id int) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetUser(v *User) *ChatBanUpdate
- func (_u *ChatBanUpdate) SetUserID(id int) *ChatBanUpdate
- func (_u *ChatBanUpdate) Where(ps ...predicate.ChatBan) *ChatBanUpdate
- type ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) ClearBannedByUser() *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) ClearIPHash() *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) ClearReason() *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) ClearRoom() *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) ClearUser() *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) Exec(ctx context.Context) error
- func (_u *ChatBanUpdateOne) ExecX(ctx context.Context)
- func (_u *ChatBanUpdateOne) Mutation() *ChatBanMutation
- func (_u *ChatBanUpdateOne) Save(ctx context.Context) (*ChatBan, error)
- func (_u *ChatBanUpdateOne) SaveX(ctx context.Context) *ChatBan
- func (_u *ChatBanUpdateOne) Select(field string, fields ...string) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetBannedByUser(v *User) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetBannedByUserID(id int) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetIPHash(v string) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetNillableIPHash(v *string) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetNillableReason(v *string) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetNillableUserID(id *int) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetReason(v string) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetRoom(v *ChatRoom) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetRoomID(id int) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetUser(v *User) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) SetUserID(id int) *ChatBanUpdateOne
- func (_u *ChatBanUpdateOne) Where(ps ...predicate.ChatBan) *ChatBanUpdateOne
- type ChatBans
- type ChatMessage
- type ChatMessageClient
- func (c *ChatMessageClient) Create() *ChatMessageCreate
- func (c *ChatMessageClient) CreateBulk(builders ...*ChatMessageCreate) *ChatMessageCreateBulk
- func (c *ChatMessageClient) Delete() *ChatMessageDelete
- func (c *ChatMessageClient) DeleteOne(_m *ChatMessage) *ChatMessageDeleteOne
- func (c *ChatMessageClient) DeleteOneID(id int) *ChatMessageDeleteOne
- func (c *ChatMessageClient) Get(ctx context.Context, id int) (*ChatMessage, error)
- func (c *ChatMessageClient) GetX(ctx context.Context, id int) *ChatMessage
- func (c *ChatMessageClient) Hooks() []Hook
- func (c *ChatMessageClient) Intercept(interceptors ...Interceptor)
- func (c *ChatMessageClient) Interceptors() []Interceptor
- func (c *ChatMessageClient) MapCreateBulk(slice any, setFunc func(*ChatMessageCreate, int)) *ChatMessageCreateBulk
- func (c *ChatMessageClient) Query() *ChatMessageQuery
- func (c *ChatMessageClient) QueryRoom(_m *ChatMessage) *ChatRoomQuery
- func (c *ChatMessageClient) QuerySender(_m *ChatMessage) *UserQuery
- func (c *ChatMessageClient) Update() *ChatMessageUpdate
- func (c *ChatMessageClient) UpdateOne(_m *ChatMessage) *ChatMessageUpdateOne
- func (c *ChatMessageClient) UpdateOneID(id int) *ChatMessageUpdateOne
- func (c *ChatMessageClient) Use(hooks ...Hook)
- type ChatMessageCreate
- func (_c *ChatMessageCreate) Exec(ctx context.Context) error
- func (_c *ChatMessageCreate) ExecX(ctx context.Context)
- func (_c *ChatMessageCreate) Mutation() *ChatMessageMutation
- func (_c *ChatMessageCreate) Save(ctx context.Context) (*ChatMessage, error)
- func (_c *ChatMessageCreate) SaveX(ctx context.Context) *ChatMessage
- func (_c *ChatMessageCreate) SetBody(v string) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetCreatedAt(v time.Time) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetNillableCreatedAt(v *time.Time) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetNillableSenderID(id *int) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetRoom(v *ChatRoom) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetRoomID(id int) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetSender(v *User) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetSenderID(id int) *ChatMessageCreate
- func (_c *ChatMessageCreate) SetSenderName(v string) *ChatMessageCreate
- type ChatMessageCreateBulk
- type ChatMessageDelete
- type ChatMessageDeleteOne
- type ChatMessageEdges
- type ChatMessageGroupBy
- func (_g *ChatMessageGroupBy) Aggregate(fns ...AggregateFunc) *ChatMessageGroupBy
- func (s *ChatMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatMessageGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatMessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatMessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatMessageGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatMessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatMessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatMessageGroupBy) IntX(ctx context.Context) int
- func (s *ChatMessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatMessageGroupBy) IntsX(ctx context.Context) []int
- func (_g *ChatMessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatMessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatMessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatMessageGroupBy) StringX(ctx context.Context) string
- func (s *ChatMessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatMessageGroupBy) StringsX(ctx context.Context) []string
- type ChatMessageMutation
- func (m *ChatMessageMutation) AddField(name string, value ent.Value) error
- func (m *ChatMessageMutation) AddedEdges() []string
- func (m *ChatMessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatMessageMutation) AddedFields() []string
- func (m *ChatMessageMutation) AddedIDs(name string) []ent.Value
- func (m *ChatMessageMutation) Body() (r string, exists bool)
- func (m *ChatMessageMutation) ClearEdge(name string) error
- func (m *ChatMessageMutation) ClearField(name string) error
- func (m *ChatMessageMutation) ClearRoom()
- func (m *ChatMessageMutation) ClearSender()
- func (m *ChatMessageMutation) ClearedEdges() []string
- func (m *ChatMessageMutation) ClearedFields() []string
- func (m ChatMessageMutation) Client() *Client
- func (m *ChatMessageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChatMessageMutation) EdgeCleared(name string) bool
- func (m *ChatMessageMutation) Field(name string) (ent.Value, bool)
- func (m *ChatMessageMutation) FieldCleared(name string) bool
- func (m *ChatMessageMutation) Fields() []string
- func (m *ChatMessageMutation) ID() (id int, exists bool)
- func (m *ChatMessageMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChatMessageMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *ChatMessageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatMessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatMessageMutation) OldSenderName(ctx context.Context) (v string, err error)
- func (m *ChatMessageMutation) Op() Op
- func (m *ChatMessageMutation) RemovedEdges() []string
- func (m *ChatMessageMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatMessageMutation) ResetBody()
- func (m *ChatMessageMutation) ResetCreatedAt()
- func (m *ChatMessageMutation) ResetEdge(name string) error
- func (m *ChatMessageMutation) ResetField(name string) error
- func (m *ChatMessageMutation) ResetRoom()
- func (m *ChatMessageMutation) ResetSender()
- func (m *ChatMessageMutation) ResetSenderName()
- func (m *ChatMessageMutation) RoomCleared() bool
- func (m *ChatMessageMutation) RoomID() (id int, exists bool)
- func (m *ChatMessageMutation) RoomIDs() (ids []int)
- func (m *ChatMessageMutation) SenderCleared() bool
- func (m *ChatMessageMutation) SenderID() (id int, exists bool)
- func (m *ChatMessageMutation) SenderIDs() (ids []int)
- func (m *ChatMessageMutation) SenderName() (r string, exists bool)
- func (m *ChatMessageMutation) SetBody(s string)
- func (m *ChatMessageMutation) SetCreatedAt(t time.Time)
- func (m *ChatMessageMutation) SetField(name string, value ent.Value) error
- func (m *ChatMessageMutation) SetOp(op Op)
- func (m *ChatMessageMutation) SetRoomID(id int)
- func (m *ChatMessageMutation) SetSenderID(id int)
- func (m *ChatMessageMutation) SetSenderName(s string)
- func (m ChatMessageMutation) Tx() (*Tx, error)
- func (m *ChatMessageMutation) Type() string
- func (m *ChatMessageMutation) Where(ps ...predicate.ChatMessage)
- func (m *ChatMessageMutation) WhereP(ps ...func(*sql.Selector))
- type ChatMessageQuery
- func (_q *ChatMessageQuery) Aggregate(fns ...AggregateFunc) *ChatMessageSelect
- func (_q *ChatMessageQuery) All(ctx context.Context) ([]*ChatMessage, error)
- func (_q *ChatMessageQuery) AllX(ctx context.Context) []*ChatMessage
- func (_q *ChatMessageQuery) Clone() *ChatMessageQuery
- func (_q *ChatMessageQuery) Count(ctx context.Context) (int, error)
- func (_q *ChatMessageQuery) CountX(ctx context.Context) int
- func (_q *ChatMessageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ChatMessageQuery) ExistX(ctx context.Context) bool
- func (_q *ChatMessageQuery) First(ctx context.Context) (*ChatMessage, error)
- func (_q *ChatMessageQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ChatMessageQuery) FirstIDX(ctx context.Context) int
- func (_q *ChatMessageQuery) FirstX(ctx context.Context) *ChatMessage
- func (_q *ChatMessageQuery) GroupBy(field string, fields ...string) *ChatMessageGroupBy
- func (_q *ChatMessageQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ChatMessageQuery) IDsX(ctx context.Context) []int
- func (_q *ChatMessageQuery) Limit(limit int) *ChatMessageQuery
- func (_q *ChatMessageQuery) Offset(offset int) *ChatMessageQuery
- func (_q *ChatMessageQuery) Only(ctx context.Context) (*ChatMessage, error)
- func (_q *ChatMessageQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ChatMessageQuery) OnlyIDX(ctx context.Context) int
- func (_q *ChatMessageQuery) OnlyX(ctx context.Context) *ChatMessage
- func (_q *ChatMessageQuery) Order(o ...chatmessage.OrderOption) *ChatMessageQuery
- func (_q *ChatMessageQuery) QueryRoom() *ChatRoomQuery
- func (_q *ChatMessageQuery) QuerySender() *UserQuery
- func (_q *ChatMessageQuery) Select(fields ...string) *ChatMessageSelect
- func (_q *ChatMessageQuery) Unique(unique bool) *ChatMessageQuery
- func (_q *ChatMessageQuery) Where(ps ...predicate.ChatMessage) *ChatMessageQuery
- func (_q *ChatMessageQuery) WithRoom(opts ...func(*ChatRoomQuery)) *ChatMessageQuery
- func (_q *ChatMessageQuery) WithSender(opts ...func(*UserQuery)) *ChatMessageQuery
- type ChatMessageSelect
- func (_s *ChatMessageSelect) Aggregate(fns ...AggregateFunc) *ChatMessageSelect
- func (s *ChatMessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatMessageSelect) BoolX(ctx context.Context) bool
- func (s *ChatMessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatMessageSelect) BoolsX(ctx context.Context) []bool
- func (s *ChatMessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatMessageSelect) Float64X(ctx context.Context) float64
- func (s *ChatMessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatMessageSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatMessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatMessageSelect) IntX(ctx context.Context) int
- func (s *ChatMessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatMessageSelect) IntsX(ctx context.Context) []int
- func (_s *ChatMessageSelect) Scan(ctx context.Context, v any) error
- func (s *ChatMessageSelect) ScanX(ctx context.Context, v any)
- func (s *ChatMessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatMessageSelect) StringX(ctx context.Context) string
- func (s *ChatMessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatMessageSelect) StringsX(ctx context.Context) []string
- type ChatMessageUpdate
- func (_u *ChatMessageUpdate) ClearRoom() *ChatMessageUpdate
- func (_u *ChatMessageUpdate) ClearSender() *ChatMessageUpdate
- func (_u *ChatMessageUpdate) Exec(ctx context.Context) error
- func (_u *ChatMessageUpdate) ExecX(ctx context.Context)
- func (_u *ChatMessageUpdate) Mutation() *ChatMessageMutation
- func (_u *ChatMessageUpdate) Save(ctx context.Context) (int, error)
- func (_u *ChatMessageUpdate) SaveX(ctx context.Context) int
- func (_u *ChatMessageUpdate) SetBody(v string) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetNillableBody(v *string) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetNillableSenderID(id *int) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetNillableSenderName(v *string) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetRoom(v *ChatRoom) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetRoomID(id int) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetSender(v *User) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetSenderID(id int) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) SetSenderName(v string) *ChatMessageUpdate
- func (_u *ChatMessageUpdate) Where(ps ...predicate.ChatMessage) *ChatMessageUpdate
- type ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) ClearRoom() *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) ClearSender() *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) Exec(ctx context.Context) error
- func (_u *ChatMessageUpdateOne) ExecX(ctx context.Context)
- func (_u *ChatMessageUpdateOne) Mutation() *ChatMessageMutation
- func (_u *ChatMessageUpdateOne) Save(ctx context.Context) (*ChatMessage, error)
- func (_u *ChatMessageUpdateOne) SaveX(ctx context.Context) *ChatMessage
- func (_u *ChatMessageUpdateOne) Select(field string, fields ...string) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetBody(v string) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetNillableBody(v *string) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetNillableSenderID(id *int) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetNillableSenderName(v *string) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetRoom(v *ChatRoom) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetRoomID(id int) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetSender(v *User) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetSenderID(id int) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) SetSenderName(v string) *ChatMessageUpdateOne
- func (_u *ChatMessageUpdateOne) Where(ps ...predicate.ChatMessage) *ChatMessageUpdateOne
- type ChatMessages
- type ChatRoom
- func (_m *ChatRoom) QueryBans() *ChatBanQuery
- func (_m *ChatRoom) QueryMessages() *ChatMessageQuery
- func (_m *ChatRoom) QueryOwner() *UserQuery
- func (_m *ChatRoom) String() string
- func (_m *ChatRoom) Unwrap() *ChatRoom
- func (_m *ChatRoom) Update() *ChatRoomUpdateOne
- func (_m *ChatRoom) Value(name string) (ent.Value, error)
- type ChatRoomClient
- func (c *ChatRoomClient) Create() *ChatRoomCreate
- func (c *ChatRoomClient) CreateBulk(builders ...*ChatRoomCreate) *ChatRoomCreateBulk
- func (c *ChatRoomClient) Delete() *ChatRoomDelete
- func (c *ChatRoomClient) DeleteOne(_m *ChatRoom) *ChatRoomDeleteOne
- func (c *ChatRoomClient) DeleteOneID(id int) *ChatRoomDeleteOne
- func (c *ChatRoomClient) Get(ctx context.Context, id int) (*ChatRoom, error)
- func (c *ChatRoomClient) GetX(ctx context.Context, id int) *ChatRoom
- func (c *ChatRoomClient) Hooks() []Hook
- func (c *ChatRoomClient) Intercept(interceptors ...Interceptor)
- func (c *ChatRoomClient) Interceptors() []Interceptor
- func (c *ChatRoomClient) MapCreateBulk(slice any, setFunc func(*ChatRoomCreate, int)) *ChatRoomCreateBulk
- func (c *ChatRoomClient) Query() *ChatRoomQuery
- func (c *ChatRoomClient) QueryBans(_m *ChatRoom) *ChatBanQuery
- func (c *ChatRoomClient) QueryMessages(_m *ChatRoom) *ChatMessageQuery
- func (c *ChatRoomClient) QueryOwner(_m *ChatRoom) *UserQuery
- func (c *ChatRoomClient) Update() *ChatRoomUpdate
- func (c *ChatRoomClient) UpdateOne(_m *ChatRoom) *ChatRoomUpdateOne
- func (c *ChatRoomClient) UpdateOneID(id int) *ChatRoomUpdateOne
- func (c *ChatRoomClient) Use(hooks ...Hook)
- type ChatRoomCreate
- func (_c *ChatRoomCreate) AddBanIDs(ids ...int) *ChatRoomCreate
- func (_c *ChatRoomCreate) AddBans(v ...*ChatBan) *ChatRoomCreate
- func (_c *ChatRoomCreate) AddMessageIDs(ids ...int) *ChatRoomCreate
- func (_c *ChatRoomCreate) AddMessages(v ...*ChatMessage) *ChatRoomCreate
- func (_c *ChatRoomCreate) Exec(ctx context.Context) error
- func (_c *ChatRoomCreate) ExecX(ctx context.Context)
- func (_c *ChatRoomCreate) Mutation() *ChatRoomMutation
- func (_c *ChatRoomCreate) Save(ctx context.Context) (*ChatRoom, error)
- func (_c *ChatRoomCreate) SaveX(ctx context.Context) *ChatRoom
- func (_c *ChatRoomCreate) SetCreatedAt(v time.Time) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetIsPublic(v bool) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetName(v string) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetNillableCreatedAt(v *time.Time) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetNillableIsPublic(v *bool) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetNillableOwnerID(id *int) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetNillablePasswordHash(v *string) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetOwner(v *User) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetOwnerID(id int) *ChatRoomCreate
- func (_c *ChatRoomCreate) SetPasswordHash(v string) *ChatRoomCreate
- type ChatRoomCreateBulk
- type ChatRoomDelete
- type ChatRoomDeleteOne
- type ChatRoomEdges
- type ChatRoomGroupBy
- func (_g *ChatRoomGroupBy) Aggregate(fns ...AggregateFunc) *ChatRoomGroupBy
- func (s *ChatRoomGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatRoomGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatRoomGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatRoomGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatRoomGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatRoomGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatRoomGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatRoomGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatRoomGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatRoomGroupBy) IntX(ctx context.Context) int
- func (s *ChatRoomGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatRoomGroupBy) IntsX(ctx context.Context) []int
- func (_g *ChatRoomGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatRoomGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatRoomGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatRoomGroupBy) StringX(ctx context.Context) string
- func (s *ChatRoomGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatRoomGroupBy) StringsX(ctx context.Context) []string
- type ChatRoomMutation
- func (m *ChatRoomMutation) AddBanIDs(ids ...int)
- func (m *ChatRoomMutation) AddField(name string, value ent.Value) error
- func (m *ChatRoomMutation) AddMessageIDs(ids ...int)
- func (m *ChatRoomMutation) AddedEdges() []string
- func (m *ChatRoomMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatRoomMutation) AddedFields() []string
- func (m *ChatRoomMutation) AddedIDs(name string) []ent.Value
- func (m *ChatRoomMutation) BansCleared() bool
- func (m *ChatRoomMutation) BansIDs() (ids []int)
- func (m *ChatRoomMutation) ClearBans()
- func (m *ChatRoomMutation) ClearEdge(name string) error
- func (m *ChatRoomMutation) ClearField(name string) error
- func (m *ChatRoomMutation) ClearMessages()
- func (m *ChatRoomMutation) ClearOwner()
- func (m *ChatRoomMutation) ClearPasswordHash()
- func (m *ChatRoomMutation) ClearedEdges() []string
- func (m *ChatRoomMutation) ClearedFields() []string
- func (m ChatRoomMutation) Client() *Client
- func (m *ChatRoomMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChatRoomMutation) EdgeCleared(name string) bool
- func (m *ChatRoomMutation) Field(name string) (ent.Value, bool)
- func (m *ChatRoomMutation) FieldCleared(name string) bool
- func (m *ChatRoomMutation) Fields() []string
- func (m *ChatRoomMutation) ID() (id int, exists bool)
- func (m *ChatRoomMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChatRoomMutation) IsPublic() (r bool, exists bool)
- func (m *ChatRoomMutation) MessagesCleared() bool
- func (m *ChatRoomMutation) MessagesIDs() (ids []int)
- func (m *ChatRoomMutation) Name() (r string, exists bool)
- func (m *ChatRoomMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatRoomMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatRoomMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *ChatRoomMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ChatRoomMutation) OldPasswordHash(ctx context.Context) (v string, err error)
- func (m *ChatRoomMutation) Op() Op
- func (m *ChatRoomMutation) OwnerCleared() bool
- func (m *ChatRoomMutation) OwnerID() (id int, exists bool)
- func (m *ChatRoomMutation) OwnerIDs() (ids []int)
- func (m *ChatRoomMutation) PasswordHash() (r string, exists bool)
- func (m *ChatRoomMutation) PasswordHashCleared() bool
- func (m *ChatRoomMutation) RemoveBanIDs(ids ...int)
- func (m *ChatRoomMutation) RemoveMessageIDs(ids ...int)
- func (m *ChatRoomMutation) RemovedBansIDs() (ids []int)
- func (m *ChatRoomMutation) RemovedEdges() []string
- func (m *ChatRoomMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatRoomMutation) RemovedMessagesIDs() (ids []int)
- func (m *ChatRoomMutation) ResetBans()
- func (m *ChatRoomMutation) ResetCreatedAt()
- func (m *ChatRoomMutation) ResetEdge(name string) error
- func (m *ChatRoomMutation) ResetField(name string) error
- func (m *ChatRoomMutation) ResetIsPublic()
- func (m *ChatRoomMutation) ResetMessages()
- func (m *ChatRoomMutation) ResetName()
- func (m *ChatRoomMutation) ResetOwner()
- func (m *ChatRoomMutation) ResetPasswordHash()
- func (m *ChatRoomMutation) SetCreatedAt(t time.Time)
- func (m *ChatRoomMutation) SetField(name string, value ent.Value) error
- func (m *ChatRoomMutation) SetIsPublic(b bool)
- func (m *ChatRoomMutation) SetName(s string)
- func (m *ChatRoomMutation) SetOp(op Op)
- func (m *ChatRoomMutation) SetOwnerID(id int)
- func (m *ChatRoomMutation) SetPasswordHash(s string)
- func (m ChatRoomMutation) Tx() (*Tx, error)
- func (m *ChatRoomMutation) Type() string
- func (m *ChatRoomMutation) Where(ps ...predicate.ChatRoom)
- func (m *ChatRoomMutation) WhereP(ps ...func(*sql.Selector))
- type ChatRoomQuery
- func (_q *ChatRoomQuery) Aggregate(fns ...AggregateFunc) *ChatRoomSelect
- func (_q *ChatRoomQuery) All(ctx context.Context) ([]*ChatRoom, error)
- func (_q *ChatRoomQuery) AllX(ctx context.Context) []*ChatRoom
- func (_q *ChatRoomQuery) Clone() *ChatRoomQuery
- func (_q *ChatRoomQuery) Count(ctx context.Context) (int, error)
- func (_q *ChatRoomQuery) CountX(ctx context.Context) int
- func (_q *ChatRoomQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ChatRoomQuery) ExistX(ctx context.Context) bool
- func (_q *ChatRoomQuery) First(ctx context.Context) (*ChatRoom, error)
- func (_q *ChatRoomQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ChatRoomQuery) FirstIDX(ctx context.Context) int
- func (_q *ChatRoomQuery) FirstX(ctx context.Context) *ChatRoom
- func (_q *ChatRoomQuery) GroupBy(field string, fields ...string) *ChatRoomGroupBy
- func (_q *ChatRoomQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ChatRoomQuery) IDsX(ctx context.Context) []int
- func (_q *ChatRoomQuery) Limit(limit int) *ChatRoomQuery
- func (_q *ChatRoomQuery) Offset(offset int) *ChatRoomQuery
- func (_q *ChatRoomQuery) Only(ctx context.Context) (*ChatRoom, error)
- func (_q *ChatRoomQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ChatRoomQuery) OnlyIDX(ctx context.Context) int
- func (_q *ChatRoomQuery) OnlyX(ctx context.Context) *ChatRoom
- func (_q *ChatRoomQuery) Order(o ...chatroom.OrderOption) *ChatRoomQuery
- func (_q *ChatRoomQuery) QueryBans() *ChatBanQuery
- func (_q *ChatRoomQuery) QueryMessages() *ChatMessageQuery
- func (_q *ChatRoomQuery) QueryOwner() *UserQuery
- func (_q *ChatRoomQuery) Select(fields ...string) *ChatRoomSelect
- func (_q *ChatRoomQuery) Unique(unique bool) *ChatRoomQuery
- func (_q *ChatRoomQuery) Where(ps ...predicate.ChatRoom) *ChatRoomQuery
- func (_q *ChatRoomQuery) WithBans(opts ...func(*ChatBanQuery)) *ChatRoomQuery
- func (_q *ChatRoomQuery) WithMessages(opts ...func(*ChatMessageQuery)) *ChatRoomQuery
- func (_q *ChatRoomQuery) WithOwner(opts ...func(*UserQuery)) *ChatRoomQuery
- type ChatRoomSelect
- func (_s *ChatRoomSelect) Aggregate(fns ...AggregateFunc) *ChatRoomSelect
- func (s *ChatRoomSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatRoomSelect) BoolX(ctx context.Context) bool
- func (s *ChatRoomSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatRoomSelect) BoolsX(ctx context.Context) []bool
- func (s *ChatRoomSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatRoomSelect) Float64X(ctx context.Context) float64
- func (s *ChatRoomSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatRoomSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatRoomSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatRoomSelect) IntX(ctx context.Context) int
- func (s *ChatRoomSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatRoomSelect) IntsX(ctx context.Context) []int
- func (_s *ChatRoomSelect) Scan(ctx context.Context, v any) error
- func (s *ChatRoomSelect) ScanX(ctx context.Context, v any)
- func (s *ChatRoomSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatRoomSelect) StringX(ctx context.Context) string
- func (s *ChatRoomSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatRoomSelect) StringsX(ctx context.Context) []string
- type ChatRoomUpdate
- func (_u *ChatRoomUpdate) AddBanIDs(ids ...int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) AddBans(v ...*ChatBan) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) AddMessageIDs(ids ...int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) AddMessages(v ...*ChatMessage) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) ClearBans() *ChatRoomUpdate
- func (_u *ChatRoomUpdate) ClearMessages() *ChatRoomUpdate
- func (_u *ChatRoomUpdate) ClearOwner() *ChatRoomUpdate
- func (_u *ChatRoomUpdate) ClearPasswordHash() *ChatRoomUpdate
- func (_u *ChatRoomUpdate) Exec(ctx context.Context) error
- func (_u *ChatRoomUpdate) ExecX(ctx context.Context)
- func (_u *ChatRoomUpdate) Mutation() *ChatRoomMutation
- func (_u *ChatRoomUpdate) RemoveBanIDs(ids ...int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) RemoveBans(v ...*ChatBan) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) RemoveMessageIDs(ids ...int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) RemoveMessages(v ...*ChatMessage) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) Save(ctx context.Context) (int, error)
- func (_u *ChatRoomUpdate) SaveX(ctx context.Context) int
- func (_u *ChatRoomUpdate) SetIsPublic(v bool) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetName(v string) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetNillableIsPublic(v *bool) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetNillableName(v *string) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetNillableOwnerID(id *int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetNillablePasswordHash(v *string) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetOwner(v *User) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetOwnerID(id int) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) SetPasswordHash(v string) *ChatRoomUpdate
- func (_u *ChatRoomUpdate) Where(ps ...predicate.ChatRoom) *ChatRoomUpdate
- type ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) AddBanIDs(ids ...int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) AddBans(v ...*ChatBan) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) AddMessageIDs(ids ...int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) AddMessages(v ...*ChatMessage) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) ClearBans() *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) ClearMessages() *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) ClearOwner() *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) ClearPasswordHash() *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) Exec(ctx context.Context) error
- func (_u *ChatRoomUpdateOne) ExecX(ctx context.Context)
- func (_u *ChatRoomUpdateOne) Mutation() *ChatRoomMutation
- func (_u *ChatRoomUpdateOne) RemoveBanIDs(ids ...int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) RemoveBans(v ...*ChatBan) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) RemoveMessageIDs(ids ...int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) RemoveMessages(v ...*ChatMessage) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) Save(ctx context.Context) (*ChatRoom, error)
- func (_u *ChatRoomUpdateOne) SaveX(ctx context.Context) *ChatRoom
- func (_u *ChatRoomUpdateOne) Select(field string, fields ...string) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetIsPublic(v bool) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetName(v string) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetNillableIsPublic(v *bool) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetNillableName(v *string) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetNillableOwnerID(id *int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetNillablePasswordHash(v *string) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetOwner(v *User) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetOwnerID(id int) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) SetPasswordHash(v string) *ChatRoomUpdateOne
- func (_u *ChatRoomUpdateOne) Where(ps ...predicate.ChatRoom) *ChatRoomUpdateOne
- type ChatRooms
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type PasswordToken
- type PasswordTokenClient
- func (c *PasswordTokenClient) Create() *PasswordTokenCreate
- func (c *PasswordTokenClient) CreateBulk(builders ...*PasswordTokenCreate) *PasswordTokenCreateBulk
- func (c *PasswordTokenClient) Delete() *PasswordTokenDelete
- func (c *PasswordTokenClient) DeleteOne(_m *PasswordToken) *PasswordTokenDeleteOne
- func (c *PasswordTokenClient) DeleteOneID(id int) *PasswordTokenDeleteOne
- func (c *PasswordTokenClient) Get(ctx context.Context, id int) (*PasswordToken, error)
- func (c *PasswordTokenClient) GetX(ctx context.Context, id int) *PasswordToken
- func (c *PasswordTokenClient) Hooks() []Hook
- func (c *PasswordTokenClient) Intercept(interceptors ...Interceptor)
- func (c *PasswordTokenClient) Interceptors() []Interceptor
- func (c *PasswordTokenClient) MapCreateBulk(slice any, setFunc func(*PasswordTokenCreate, int)) *PasswordTokenCreateBulk
- func (c *PasswordTokenClient) Query() *PasswordTokenQuery
- func (c *PasswordTokenClient) QueryUser(_m *PasswordToken) *UserQuery
- func (c *PasswordTokenClient) Update() *PasswordTokenUpdate
- func (c *PasswordTokenClient) UpdateOne(_m *PasswordToken) *PasswordTokenUpdateOne
- func (c *PasswordTokenClient) UpdateOneID(id int) *PasswordTokenUpdateOne
- func (c *PasswordTokenClient) Use(hooks ...Hook)
- type PasswordTokenCreate
- func (_c *PasswordTokenCreate) Exec(ctx context.Context) error
- func (_c *PasswordTokenCreate) ExecX(ctx context.Context)
- func (_c *PasswordTokenCreate) Mutation() *PasswordTokenMutation
- func (_c *PasswordTokenCreate) Save(ctx context.Context) (*PasswordToken, error)
- func (_c *PasswordTokenCreate) SaveX(ctx context.Context) *PasswordToken
- func (_c *PasswordTokenCreate) SetCreatedAt(v time.Time) *PasswordTokenCreate
- func (_c *PasswordTokenCreate) SetNillableCreatedAt(v *time.Time) *PasswordTokenCreate
- func (_c *PasswordTokenCreate) SetToken(v string) *PasswordTokenCreate
- func (_c *PasswordTokenCreate) SetUser(v *User) *PasswordTokenCreate
- func (_c *PasswordTokenCreate) SetUserID(v int) *PasswordTokenCreate
- type PasswordTokenCreateBulk
- type PasswordTokenDelete
- type PasswordTokenDeleteOne
- type PasswordTokenEdges
- type PasswordTokenGroupBy
- func (_g *PasswordTokenGroupBy) Aggregate(fns ...AggregateFunc) *PasswordTokenGroupBy
- func (s *PasswordTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PasswordTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *PasswordTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PasswordTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PasswordTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PasswordTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *PasswordTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PasswordTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PasswordTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PasswordTokenGroupBy) IntX(ctx context.Context) int
- func (s *PasswordTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PasswordTokenGroupBy) IntsX(ctx context.Context) []int
- func (_g *PasswordTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *PasswordTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *PasswordTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PasswordTokenGroupBy) StringX(ctx context.Context) string
- func (s *PasswordTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PasswordTokenGroupBy) StringsX(ctx context.Context) []string
- type PasswordTokenMutation
- func (m *PasswordTokenMutation) AddField(name string, value ent.Value) error
- func (m *PasswordTokenMutation) AddedEdges() []string
- func (m *PasswordTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *PasswordTokenMutation) AddedFields() []string
- func (m *PasswordTokenMutation) AddedIDs(name string) []ent.Value
- func (m *PasswordTokenMutation) ClearEdge(name string) error
- func (m *PasswordTokenMutation) ClearField(name string) error
- func (m *PasswordTokenMutation) ClearUser()
- func (m *PasswordTokenMutation) ClearedEdges() []string
- func (m *PasswordTokenMutation) ClearedFields() []string
- func (m PasswordTokenMutation) Client() *Client
- func (m *PasswordTokenMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PasswordTokenMutation) EdgeCleared(name string) bool
- func (m *PasswordTokenMutation) Field(name string) (ent.Value, bool)
- func (m *PasswordTokenMutation) FieldCleared(name string) bool
- func (m *PasswordTokenMutation) Fields() []string
- func (m *PasswordTokenMutation) ID() (id int, exists bool)
- func (m *PasswordTokenMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PasswordTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PasswordTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PasswordTokenMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *PasswordTokenMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *PasswordTokenMutation) Op() Op
- func (m *PasswordTokenMutation) RemovedEdges() []string
- func (m *PasswordTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *PasswordTokenMutation) ResetCreatedAt()
- func (m *PasswordTokenMutation) ResetEdge(name string) error
- func (m *PasswordTokenMutation) ResetField(name string) error
- func (m *PasswordTokenMutation) ResetToken()
- func (m *PasswordTokenMutation) ResetUser()
- func (m *PasswordTokenMutation) ResetUserID()
- func (m *PasswordTokenMutation) SetCreatedAt(t time.Time)
- func (m *PasswordTokenMutation) SetField(name string, value ent.Value) error
- func (m *PasswordTokenMutation) SetOp(op Op)
- func (m *PasswordTokenMutation) SetToken(s string)
- func (m *PasswordTokenMutation) SetUserID(i int)
- func (m *PasswordTokenMutation) Token() (r string, exists bool)
- func (m PasswordTokenMutation) Tx() (*Tx, error)
- func (m *PasswordTokenMutation) Type() string
- func (m *PasswordTokenMutation) UserCleared() bool
- func (m *PasswordTokenMutation) UserID() (r int, exists bool)
- func (m *PasswordTokenMutation) UserIDs() (ids []int)
- func (m *PasswordTokenMutation) Where(ps ...predicate.PasswordToken)
- func (m *PasswordTokenMutation) WhereP(ps ...func(*sql.Selector))
- type PasswordTokenQuery
- func (_q *PasswordTokenQuery) Aggregate(fns ...AggregateFunc) *PasswordTokenSelect
- func (_q *PasswordTokenQuery) All(ctx context.Context) ([]*PasswordToken, error)
- func (_q *PasswordTokenQuery) AllX(ctx context.Context) []*PasswordToken
- func (_q *PasswordTokenQuery) Clone() *PasswordTokenQuery
- func (_q *PasswordTokenQuery) Count(ctx context.Context) (int, error)
- func (_q *PasswordTokenQuery) CountX(ctx context.Context) int
- func (_q *PasswordTokenQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PasswordTokenQuery) ExistX(ctx context.Context) bool
- func (_q *PasswordTokenQuery) First(ctx context.Context) (*PasswordToken, error)
- func (_q *PasswordTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PasswordTokenQuery) FirstIDX(ctx context.Context) int
- func (_q *PasswordTokenQuery) FirstX(ctx context.Context) *PasswordToken
- func (_q *PasswordTokenQuery) GroupBy(field string, fields ...string) *PasswordTokenGroupBy
- func (_q *PasswordTokenQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PasswordTokenQuery) IDsX(ctx context.Context) []int
- func (_q *PasswordTokenQuery) Limit(limit int) *PasswordTokenQuery
- func (_q *PasswordTokenQuery) Offset(offset int) *PasswordTokenQuery
- func (_q *PasswordTokenQuery) Only(ctx context.Context) (*PasswordToken, error)
- func (_q *PasswordTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PasswordTokenQuery) OnlyIDX(ctx context.Context) int
- func (_q *PasswordTokenQuery) OnlyX(ctx context.Context) *PasswordToken
- func (_q *PasswordTokenQuery) Order(o ...passwordtoken.OrderOption) *PasswordTokenQuery
- func (_q *PasswordTokenQuery) QueryUser() *UserQuery
- func (_q *PasswordTokenQuery) Select(fields ...string) *PasswordTokenSelect
- func (_q *PasswordTokenQuery) Unique(unique bool) *PasswordTokenQuery
- func (_q *PasswordTokenQuery) Where(ps ...predicate.PasswordToken) *PasswordTokenQuery
- func (_q *PasswordTokenQuery) WithUser(opts ...func(*UserQuery)) *PasswordTokenQuery
- type PasswordTokenSelect
- func (_s *PasswordTokenSelect) Aggregate(fns ...AggregateFunc) *PasswordTokenSelect
- func (s *PasswordTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PasswordTokenSelect) BoolX(ctx context.Context) bool
- func (s *PasswordTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PasswordTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *PasswordTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PasswordTokenSelect) Float64X(ctx context.Context) float64
- func (s *PasswordTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PasswordTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *PasswordTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PasswordTokenSelect) IntX(ctx context.Context) int
- func (s *PasswordTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PasswordTokenSelect) IntsX(ctx context.Context) []int
- func (_s *PasswordTokenSelect) Scan(ctx context.Context, v any) error
- func (s *PasswordTokenSelect) ScanX(ctx context.Context, v any)
- func (s *PasswordTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *PasswordTokenSelect) StringX(ctx context.Context) string
- func (s *PasswordTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PasswordTokenSelect) StringsX(ctx context.Context) []string
- type PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) ClearUser() *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) Exec(ctx context.Context) error
- func (_u *PasswordTokenUpdate) ExecX(ctx context.Context)
- func (_u *PasswordTokenUpdate) Mutation() *PasswordTokenMutation
- func (_u *PasswordTokenUpdate) Save(ctx context.Context) (int, error)
- func (_u *PasswordTokenUpdate) SaveX(ctx context.Context) int
- func (_u *PasswordTokenUpdate) SetCreatedAt(v time.Time) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetNillableCreatedAt(v *time.Time) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetNillableToken(v *string) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetNillableUserID(v *int) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetToken(v string) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetUser(v *User) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) SetUserID(v int) *PasswordTokenUpdate
- func (_u *PasswordTokenUpdate) Where(ps ...predicate.PasswordToken) *PasswordTokenUpdate
- type PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) ClearUser() *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) Exec(ctx context.Context) error
- func (_u *PasswordTokenUpdateOne) ExecX(ctx context.Context)
- func (_u *PasswordTokenUpdateOne) Mutation() *PasswordTokenMutation
- func (_u *PasswordTokenUpdateOne) Save(ctx context.Context) (*PasswordToken, error)
- func (_u *PasswordTokenUpdateOne) SaveX(ctx context.Context) *PasswordToken
- func (_u *PasswordTokenUpdateOne) Select(field string, fields ...string) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetCreatedAt(v time.Time) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetNillableCreatedAt(v *time.Time) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetNillableToken(v *string) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetNillableUserID(v *int) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetToken(v string) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetUser(v *User) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) SetUserID(v int) *PasswordTokenUpdateOne
- func (_u *PasswordTokenUpdateOne) Where(ps ...predicate.PasswordToken) *PasswordTokenUpdateOne
- type PasswordTokens
- type PaymentCustomer
- func (_m *PaymentCustomer) QueryPaymentIntents() *PaymentIntentQuery
- func (_m *PaymentCustomer) QueryPaymentMethods() *PaymentMethodQuery
- func (_m *PaymentCustomer) QuerySubscriptions() *SubscriptionQuery
- func (_m *PaymentCustomer) QueryUser() *UserQuery
- func (_m *PaymentCustomer) String() string
- func (_m *PaymentCustomer) Unwrap() *PaymentCustomer
- func (_m *PaymentCustomer) Update() *PaymentCustomerUpdateOne
- func (_m *PaymentCustomer) Value(name string) (ent.Value, error)
- type PaymentCustomerClient
- func (c *PaymentCustomerClient) Create() *PaymentCustomerCreate
- func (c *PaymentCustomerClient) CreateBulk(builders ...*PaymentCustomerCreate) *PaymentCustomerCreateBulk
- func (c *PaymentCustomerClient) Delete() *PaymentCustomerDelete
- func (c *PaymentCustomerClient) DeleteOne(_m *PaymentCustomer) *PaymentCustomerDeleteOne
- func (c *PaymentCustomerClient) DeleteOneID(id int) *PaymentCustomerDeleteOne
- func (c *PaymentCustomerClient) Get(ctx context.Context, id int) (*PaymentCustomer, error)
- func (c *PaymentCustomerClient) GetX(ctx context.Context, id int) *PaymentCustomer
- func (c *PaymentCustomerClient) Hooks() []Hook
- func (c *PaymentCustomerClient) Intercept(interceptors ...Interceptor)
- func (c *PaymentCustomerClient) Interceptors() []Interceptor
- func (c *PaymentCustomerClient) MapCreateBulk(slice any, setFunc func(*PaymentCustomerCreate, int)) *PaymentCustomerCreateBulk
- func (c *PaymentCustomerClient) Query() *PaymentCustomerQuery
- func (c *PaymentCustomerClient) QueryPaymentIntents(_m *PaymentCustomer) *PaymentIntentQuery
- func (c *PaymentCustomerClient) QueryPaymentMethods(_m *PaymentCustomer) *PaymentMethodQuery
- func (c *PaymentCustomerClient) QuerySubscriptions(_m *PaymentCustomer) *SubscriptionQuery
- func (c *PaymentCustomerClient) QueryUser(_m *PaymentCustomer) *UserQuery
- func (c *PaymentCustomerClient) Update() *PaymentCustomerUpdate
- func (c *PaymentCustomerClient) UpdateOne(_m *PaymentCustomer) *PaymentCustomerUpdateOne
- func (c *PaymentCustomerClient) UpdateOneID(id int) *PaymentCustomerUpdateOne
- func (c *PaymentCustomerClient) Use(hooks ...Hook)
- type PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddPaymentIntentIDs(ids ...int) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddPaymentMethodIDs(ids ...int) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddSubscriptionIDs(ids ...int) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) AddSubscriptions(v ...*Subscription) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) Exec(ctx context.Context) error
- func (_c *PaymentCustomerCreate) ExecX(ctx context.Context)
- func (_c *PaymentCustomerCreate) Mutation() *PaymentCustomerMutation
- func (_c *PaymentCustomerCreate) Save(ctx context.Context) (*PaymentCustomer, error)
- func (_c *PaymentCustomerCreate) SaveX(ctx context.Context) *PaymentCustomer
- func (_c *PaymentCustomerCreate) SetCreatedAt(v time.Time) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetEmail(v string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetMetadata(v map[string]interface{}) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetName(v string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetNillableCreatedAt(v *time.Time) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetNillableName(v *string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetNillableProvider(v *string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetNillableUpdatedAt(v *time.Time) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetProvider(v string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetProviderCustomerID(v string) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetUpdatedAt(v time.Time) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetUser(v *User) *PaymentCustomerCreate
- func (_c *PaymentCustomerCreate) SetUserID(id int) *PaymentCustomerCreate
- type PaymentCustomerCreateBulk
- func (_c *PaymentCustomerCreateBulk) Exec(ctx context.Context) error
- func (_c *PaymentCustomerCreateBulk) ExecX(ctx context.Context)
- func (_c *PaymentCustomerCreateBulk) Save(ctx context.Context) ([]*PaymentCustomer, error)
- func (_c *PaymentCustomerCreateBulk) SaveX(ctx context.Context) []*PaymentCustomer
- type PaymentCustomerDelete
- type PaymentCustomerDeleteOne
- type PaymentCustomerEdges
- type PaymentCustomerGroupBy
- func (_g *PaymentCustomerGroupBy) Aggregate(fns ...AggregateFunc) *PaymentCustomerGroupBy
- func (s *PaymentCustomerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentCustomerGroupBy) BoolX(ctx context.Context) bool
- func (s *PaymentCustomerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentCustomerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PaymentCustomerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentCustomerGroupBy) Float64X(ctx context.Context) float64
- func (s *PaymentCustomerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentCustomerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PaymentCustomerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentCustomerGroupBy) IntX(ctx context.Context) int
- func (s *PaymentCustomerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentCustomerGroupBy) IntsX(ctx context.Context) []int
- func (_g *PaymentCustomerGroupBy) Scan(ctx context.Context, v any) error
- func (s *PaymentCustomerGroupBy) ScanX(ctx context.Context, v any)
- func (s *PaymentCustomerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PaymentCustomerGroupBy) StringX(ctx context.Context) string
- func (s *PaymentCustomerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentCustomerGroupBy) StringsX(ctx context.Context) []string
- type PaymentCustomerMutation
- func (m *PaymentCustomerMutation) AddField(name string, value ent.Value) error
- func (m *PaymentCustomerMutation) AddPaymentIntentIDs(ids ...int)
- func (m *PaymentCustomerMutation) AddPaymentMethodIDs(ids ...int)
- func (m *PaymentCustomerMutation) AddSubscriptionIDs(ids ...int)
- func (m *PaymentCustomerMutation) AddedEdges() []string
- func (m *PaymentCustomerMutation) AddedField(name string) (ent.Value, bool)
- func (m *PaymentCustomerMutation) AddedFields() []string
- func (m *PaymentCustomerMutation) AddedIDs(name string) []ent.Value
- func (m *PaymentCustomerMutation) ClearEdge(name string) error
- func (m *PaymentCustomerMutation) ClearField(name string) error
- func (m *PaymentCustomerMutation) ClearMetadata()
- func (m *PaymentCustomerMutation) ClearName()
- func (m *PaymentCustomerMutation) ClearPaymentIntents()
- func (m *PaymentCustomerMutation) ClearPaymentMethods()
- func (m *PaymentCustomerMutation) ClearSubscriptions()
- func (m *PaymentCustomerMutation) ClearUser()
- func (m *PaymentCustomerMutation) ClearedEdges() []string
- func (m *PaymentCustomerMutation) ClearedFields() []string
- func (m PaymentCustomerMutation) Client() *Client
- func (m *PaymentCustomerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PaymentCustomerMutation) EdgeCleared(name string) bool
- func (m *PaymentCustomerMutation) Email() (r string, exists bool)
- func (m *PaymentCustomerMutation) Field(name string) (ent.Value, bool)
- func (m *PaymentCustomerMutation) FieldCleared(name string) bool
- func (m *PaymentCustomerMutation) Fields() []string
- func (m *PaymentCustomerMutation) ID() (id int, exists bool)
- func (m *PaymentCustomerMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PaymentCustomerMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *PaymentCustomerMutation) MetadataCleared() bool
- func (m *PaymentCustomerMutation) Name() (r string, exists bool)
- func (m *PaymentCustomerMutation) NameCleared() bool
- func (m *PaymentCustomerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentCustomerMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *PaymentCustomerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PaymentCustomerMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *PaymentCustomerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PaymentCustomerMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *PaymentCustomerMutation) OldProviderCustomerID(ctx context.Context) (v string, err error)
- func (m *PaymentCustomerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentCustomerMutation) Op() Op
- func (m *PaymentCustomerMutation) PaymentIntentsCleared() bool
- func (m *PaymentCustomerMutation) PaymentIntentsIDs() (ids []int)
- func (m *PaymentCustomerMutation) PaymentMethodsCleared() bool
- func (m *PaymentCustomerMutation) PaymentMethodsIDs() (ids []int)
- func (m *PaymentCustomerMutation) Provider() (r string, exists bool)
- func (m *PaymentCustomerMutation) ProviderCustomerID() (r string, exists bool)
- func (m *PaymentCustomerMutation) RemovePaymentIntentIDs(ids ...int)
- func (m *PaymentCustomerMutation) RemovePaymentMethodIDs(ids ...int)
- func (m *PaymentCustomerMutation) RemoveSubscriptionIDs(ids ...int)
- func (m *PaymentCustomerMutation) RemovedEdges() []string
- func (m *PaymentCustomerMutation) RemovedIDs(name string) []ent.Value
- func (m *PaymentCustomerMutation) RemovedPaymentIntentsIDs() (ids []int)
- func (m *PaymentCustomerMutation) RemovedPaymentMethodsIDs() (ids []int)
- func (m *PaymentCustomerMutation) RemovedSubscriptionsIDs() (ids []int)
- func (m *PaymentCustomerMutation) ResetCreatedAt()
- func (m *PaymentCustomerMutation) ResetEdge(name string) error
- func (m *PaymentCustomerMutation) ResetEmail()
- func (m *PaymentCustomerMutation) ResetField(name string) error
- func (m *PaymentCustomerMutation) ResetMetadata()
- func (m *PaymentCustomerMutation) ResetName()
- func (m *PaymentCustomerMutation) ResetPaymentIntents()
- func (m *PaymentCustomerMutation) ResetPaymentMethods()
- func (m *PaymentCustomerMutation) ResetProvider()
- func (m *PaymentCustomerMutation) ResetProviderCustomerID()
- func (m *PaymentCustomerMutation) ResetSubscriptions()
- func (m *PaymentCustomerMutation) ResetUpdatedAt()
- func (m *PaymentCustomerMutation) ResetUser()
- func (m *PaymentCustomerMutation) SetCreatedAt(t time.Time)
- func (m *PaymentCustomerMutation) SetEmail(s string)
- func (m *PaymentCustomerMutation) SetField(name string, value ent.Value) error
- func (m *PaymentCustomerMutation) SetMetadata(value map[string]interface{})
- func (m *PaymentCustomerMutation) SetName(s string)
- func (m *PaymentCustomerMutation) SetOp(op Op)
- func (m *PaymentCustomerMutation) SetProvider(s string)
- func (m *PaymentCustomerMutation) SetProviderCustomerID(s string)
- func (m *PaymentCustomerMutation) SetUpdatedAt(t time.Time)
- func (m *PaymentCustomerMutation) SetUserID(id int)
- func (m *PaymentCustomerMutation) SubscriptionsCleared() bool
- func (m *PaymentCustomerMutation) SubscriptionsIDs() (ids []int)
- func (m PaymentCustomerMutation) Tx() (*Tx, error)
- func (m *PaymentCustomerMutation) Type() string
- func (m *PaymentCustomerMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PaymentCustomerMutation) UserCleared() bool
- func (m *PaymentCustomerMutation) UserID() (id int, exists bool)
- func (m *PaymentCustomerMutation) UserIDs() (ids []int)
- func (m *PaymentCustomerMutation) Where(ps ...predicate.PaymentCustomer)
- func (m *PaymentCustomerMutation) WhereP(ps ...func(*sql.Selector))
- type PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) Aggregate(fns ...AggregateFunc) *PaymentCustomerSelect
- func (_q *PaymentCustomerQuery) All(ctx context.Context) ([]*PaymentCustomer, error)
- func (_q *PaymentCustomerQuery) AllX(ctx context.Context) []*PaymentCustomer
- func (_q *PaymentCustomerQuery) Clone() *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) Count(ctx context.Context) (int, error)
- func (_q *PaymentCustomerQuery) CountX(ctx context.Context) int
- func (_q *PaymentCustomerQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PaymentCustomerQuery) ExistX(ctx context.Context) bool
- func (_q *PaymentCustomerQuery) First(ctx context.Context) (*PaymentCustomer, error)
- func (_q *PaymentCustomerQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PaymentCustomerQuery) FirstIDX(ctx context.Context) int
- func (_q *PaymentCustomerQuery) FirstX(ctx context.Context) *PaymentCustomer
- func (_q *PaymentCustomerQuery) GroupBy(field string, fields ...string) *PaymentCustomerGroupBy
- func (_q *PaymentCustomerQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PaymentCustomerQuery) IDsX(ctx context.Context) []int
- func (_q *PaymentCustomerQuery) Limit(limit int) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) Offset(offset int) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) Only(ctx context.Context) (*PaymentCustomer, error)
- func (_q *PaymentCustomerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PaymentCustomerQuery) OnlyIDX(ctx context.Context) int
- func (_q *PaymentCustomerQuery) OnlyX(ctx context.Context) *PaymentCustomer
- func (_q *PaymentCustomerQuery) Order(o ...paymentcustomer.OrderOption) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) QueryPaymentIntents() *PaymentIntentQuery
- func (_q *PaymentCustomerQuery) QueryPaymentMethods() *PaymentMethodQuery
- func (_q *PaymentCustomerQuery) QuerySubscriptions() *SubscriptionQuery
- func (_q *PaymentCustomerQuery) QueryUser() *UserQuery
- func (_q *PaymentCustomerQuery) Select(fields ...string) *PaymentCustomerSelect
- func (_q *PaymentCustomerQuery) Unique(unique bool) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) WithPaymentIntents(opts ...func(*PaymentIntentQuery)) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) WithPaymentMethods(opts ...func(*PaymentMethodQuery)) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *PaymentCustomerQuery
- func (_q *PaymentCustomerQuery) WithUser(opts ...func(*UserQuery)) *PaymentCustomerQuery
- type PaymentCustomerSelect
- func (_s *PaymentCustomerSelect) Aggregate(fns ...AggregateFunc) *PaymentCustomerSelect
- func (s *PaymentCustomerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentCustomerSelect) BoolX(ctx context.Context) bool
- func (s *PaymentCustomerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentCustomerSelect) BoolsX(ctx context.Context) []bool
- func (s *PaymentCustomerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentCustomerSelect) Float64X(ctx context.Context) float64
- func (s *PaymentCustomerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentCustomerSelect) Float64sX(ctx context.Context) []float64
- func (s *PaymentCustomerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentCustomerSelect) IntX(ctx context.Context) int
- func (s *PaymentCustomerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentCustomerSelect) IntsX(ctx context.Context) []int
- func (_s *PaymentCustomerSelect) Scan(ctx context.Context, v any) error
- func (s *PaymentCustomerSelect) ScanX(ctx context.Context, v any)
- func (s *PaymentCustomerSelect) String(ctx context.Context) (_ string, err error)
- func (s *PaymentCustomerSelect) StringX(ctx context.Context) string
- func (s *PaymentCustomerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentCustomerSelect) StringsX(ctx context.Context) []string
- type PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddPaymentIntentIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddPaymentMethodIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddSubscriptionIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) AddSubscriptions(v ...*Subscription) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearMetadata() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearName() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearPaymentIntents() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearPaymentMethods() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearSubscriptions() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) ClearUser() *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) Exec(ctx context.Context) error
- func (_u *PaymentCustomerUpdate) ExecX(ctx context.Context)
- func (_u *PaymentCustomerUpdate) Mutation() *PaymentCustomerMutation
- func (_u *PaymentCustomerUpdate) RemovePaymentIntentIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) RemovePaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) RemovePaymentMethodIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) RemovePaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) RemoveSubscriptionIDs(ids ...int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) RemoveSubscriptions(v ...*Subscription) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) Save(ctx context.Context) (int, error)
- func (_u *PaymentCustomerUpdate) SaveX(ctx context.Context) int
- func (_u *PaymentCustomerUpdate) SetEmail(v string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetMetadata(v map[string]interface{}) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetName(v string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetNillableEmail(v *string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetNillableName(v *string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetNillableProvider(v *string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetNillableProviderCustomerID(v *string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetProvider(v string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetProviderCustomerID(v string) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetUpdatedAt(v time.Time) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetUser(v *User) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) SetUserID(id int) *PaymentCustomerUpdate
- func (_u *PaymentCustomerUpdate) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerUpdate
- type PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddPaymentIntentIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddPaymentMethodIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddSubscriptionIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) AddSubscriptions(v ...*Subscription) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearMetadata() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearName() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearPaymentIntents() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearPaymentMethods() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearSubscriptions() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) ClearUser() *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) Exec(ctx context.Context) error
- func (_u *PaymentCustomerUpdateOne) ExecX(ctx context.Context)
- func (_u *PaymentCustomerUpdateOne) Mutation() *PaymentCustomerMutation
- func (_u *PaymentCustomerUpdateOne) RemovePaymentIntentIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) RemovePaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) RemovePaymentMethodIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) RemovePaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) RemoveSubscriptionIDs(ids ...int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) RemoveSubscriptions(v ...*Subscription) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) Save(ctx context.Context) (*PaymentCustomer, error)
- func (_u *PaymentCustomerUpdateOne) SaveX(ctx context.Context) *PaymentCustomer
- func (_u *PaymentCustomerUpdateOne) Select(field string, fields ...string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetEmail(v string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetMetadata(v map[string]interface{}) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetName(v string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetNillableEmail(v *string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetNillableName(v *string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetNillableProvider(v *string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetNillableProviderCustomerID(v *string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetProvider(v string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetProviderCustomerID(v string) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetUpdatedAt(v time.Time) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetUser(v *User) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) SetUserID(id int) *PaymentCustomerUpdateOne
- func (_u *PaymentCustomerUpdateOne) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerUpdateOne
- type PaymentCustomers
- type PaymentIntent
- type PaymentIntentClient
- func (c *PaymentIntentClient) Create() *PaymentIntentCreate
- func (c *PaymentIntentClient) CreateBulk(builders ...*PaymentIntentCreate) *PaymentIntentCreateBulk
- func (c *PaymentIntentClient) Delete() *PaymentIntentDelete
- func (c *PaymentIntentClient) DeleteOne(_m *PaymentIntent) *PaymentIntentDeleteOne
- func (c *PaymentIntentClient) DeleteOneID(id int) *PaymentIntentDeleteOne
- func (c *PaymentIntentClient) Get(ctx context.Context, id int) (*PaymentIntent, error)
- func (c *PaymentIntentClient) GetX(ctx context.Context, id int) *PaymentIntent
- func (c *PaymentIntentClient) Hooks() []Hook
- func (c *PaymentIntentClient) Intercept(interceptors ...Interceptor)
- func (c *PaymentIntentClient) Interceptors() []Interceptor
- func (c *PaymentIntentClient) MapCreateBulk(slice any, setFunc func(*PaymentIntentCreate, int)) *PaymentIntentCreateBulk
- func (c *PaymentIntentClient) Query() *PaymentIntentQuery
- func (c *PaymentIntentClient) QueryCustomer(_m *PaymentIntent) *PaymentCustomerQuery
- func (c *PaymentIntentClient) Update() *PaymentIntentUpdate
- func (c *PaymentIntentClient) UpdateOne(_m *PaymentIntent) *PaymentIntentUpdateOne
- func (c *PaymentIntentClient) UpdateOneID(id int) *PaymentIntentUpdateOne
- func (c *PaymentIntentClient) Use(hooks ...Hook)
- type PaymentIntentCreate
- func (_c *PaymentIntentCreate) Exec(ctx context.Context) error
- func (_c *PaymentIntentCreate) ExecX(ctx context.Context)
- func (_c *PaymentIntentCreate) Mutation() *PaymentIntentMutation
- func (_c *PaymentIntentCreate) Save(ctx context.Context) (*PaymentIntent, error)
- func (_c *PaymentIntentCreate) SaveX(ctx context.Context) *PaymentIntent
- func (_c *PaymentIntentCreate) SetAmount(v int64) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetClientSecret(v string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetCreatedAt(v time.Time) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetCurrency(v string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetCustomer(v *PaymentCustomer) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetCustomerID(id int) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetDescription(v string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetMetadata(v map[string]interface{}) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableClientSecret(v *string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableCreatedAt(v *time.Time) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableCurrency(v *string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableDescription(v *string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableProvider(v *string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableStatus(v *paymentintent.Status) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetNillableUpdatedAt(v *time.Time) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetProvider(v string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetProviderPaymentIntentID(v string) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetStatus(v paymentintent.Status) *PaymentIntentCreate
- func (_c *PaymentIntentCreate) SetUpdatedAt(v time.Time) *PaymentIntentCreate
- type PaymentIntentCreateBulk
- type PaymentIntentDelete
- type PaymentIntentDeleteOne
- type PaymentIntentEdges
- type PaymentIntentGroupBy
- func (_g *PaymentIntentGroupBy) Aggregate(fns ...AggregateFunc) *PaymentIntentGroupBy
- func (s *PaymentIntentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentIntentGroupBy) BoolX(ctx context.Context) bool
- func (s *PaymentIntentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentIntentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PaymentIntentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentIntentGroupBy) Float64X(ctx context.Context) float64
- func (s *PaymentIntentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentIntentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PaymentIntentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentIntentGroupBy) IntX(ctx context.Context) int
- func (s *PaymentIntentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentIntentGroupBy) IntsX(ctx context.Context) []int
- func (_g *PaymentIntentGroupBy) Scan(ctx context.Context, v any) error
- func (s *PaymentIntentGroupBy) ScanX(ctx context.Context, v any)
- func (s *PaymentIntentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PaymentIntentGroupBy) StringX(ctx context.Context) string
- func (s *PaymentIntentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentIntentGroupBy) StringsX(ctx context.Context) []string
- type PaymentIntentMutation
- func (m *PaymentIntentMutation) AddAmount(i int64)
- func (m *PaymentIntentMutation) AddField(name string, value ent.Value) error
- func (m *PaymentIntentMutation) AddedAmount() (r int64, exists bool)
- func (m *PaymentIntentMutation) AddedEdges() []string
- func (m *PaymentIntentMutation) AddedField(name string) (ent.Value, bool)
- func (m *PaymentIntentMutation) AddedFields() []string
- func (m *PaymentIntentMutation) AddedIDs(name string) []ent.Value
- func (m *PaymentIntentMutation) Amount() (r int64, exists bool)
- func (m *PaymentIntentMutation) ClearClientSecret()
- func (m *PaymentIntentMutation) ClearCustomer()
- func (m *PaymentIntentMutation) ClearDescription()
- func (m *PaymentIntentMutation) ClearEdge(name string) error
- func (m *PaymentIntentMutation) ClearField(name string) error
- func (m *PaymentIntentMutation) ClearMetadata()
- func (m *PaymentIntentMutation) ClearedEdges() []string
- func (m *PaymentIntentMutation) ClearedFields() []string
- func (m PaymentIntentMutation) Client() *Client
- func (m *PaymentIntentMutation) ClientSecret() (r string, exists bool)
- func (m *PaymentIntentMutation) ClientSecretCleared() bool
- func (m *PaymentIntentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PaymentIntentMutation) Currency() (r string, exists bool)
- func (m *PaymentIntentMutation) CustomerCleared() bool
- func (m *PaymentIntentMutation) CustomerID() (id int, exists bool)
- func (m *PaymentIntentMutation) CustomerIDs() (ids []int)
- func (m *PaymentIntentMutation) Description() (r string, exists bool)
- func (m *PaymentIntentMutation) DescriptionCleared() bool
- func (m *PaymentIntentMutation) EdgeCleared(name string) bool
- func (m *PaymentIntentMutation) Field(name string) (ent.Value, bool)
- func (m *PaymentIntentMutation) FieldCleared(name string) bool
- func (m *PaymentIntentMutation) Fields() []string
- func (m *PaymentIntentMutation) ID() (id int, exists bool)
- func (m *PaymentIntentMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PaymentIntentMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *PaymentIntentMutation) MetadataCleared() bool
- func (m *PaymentIntentMutation) OldAmount(ctx context.Context) (v int64, err error)
- func (m *PaymentIntentMutation) OldClientSecret(ctx context.Context) (v string, err error)
- func (m *PaymentIntentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentIntentMutation) OldCurrency(ctx context.Context) (v string, err error)
- func (m *PaymentIntentMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *PaymentIntentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PaymentIntentMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *PaymentIntentMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *PaymentIntentMutation) OldProviderPaymentIntentID(ctx context.Context) (v string, err error)
- func (m *PaymentIntentMutation) OldStatus(ctx context.Context) (v paymentintent.Status, err error)
- func (m *PaymentIntentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentIntentMutation) Op() Op
- func (m *PaymentIntentMutation) Provider() (r string, exists bool)
- func (m *PaymentIntentMutation) ProviderPaymentIntentID() (r string, exists bool)
- func (m *PaymentIntentMutation) RemovedEdges() []string
- func (m *PaymentIntentMutation) RemovedIDs(name string) []ent.Value
- func (m *PaymentIntentMutation) ResetAmount()
- func (m *PaymentIntentMutation) ResetClientSecret()
- func (m *PaymentIntentMutation) ResetCreatedAt()
- func (m *PaymentIntentMutation) ResetCurrency()
- func (m *PaymentIntentMutation) ResetCustomer()
- func (m *PaymentIntentMutation) ResetDescription()
- func (m *PaymentIntentMutation) ResetEdge(name string) error
- func (m *PaymentIntentMutation) ResetField(name string) error
- func (m *PaymentIntentMutation) ResetMetadata()
- func (m *PaymentIntentMutation) ResetProvider()
- func (m *PaymentIntentMutation) ResetProviderPaymentIntentID()
- func (m *PaymentIntentMutation) ResetStatus()
- func (m *PaymentIntentMutation) ResetUpdatedAt()
- func (m *PaymentIntentMutation) SetAmount(i int64)
- func (m *PaymentIntentMutation) SetClientSecret(s string)
- func (m *PaymentIntentMutation) SetCreatedAt(t time.Time)
- func (m *PaymentIntentMutation) SetCurrency(s string)
- func (m *PaymentIntentMutation) SetCustomerID(id int)
- func (m *PaymentIntentMutation) SetDescription(s string)
- func (m *PaymentIntentMutation) SetField(name string, value ent.Value) error
- func (m *PaymentIntentMutation) SetMetadata(value map[string]interface{})
- func (m *PaymentIntentMutation) SetOp(op Op)
- func (m *PaymentIntentMutation) SetProvider(s string)
- func (m *PaymentIntentMutation) SetProviderPaymentIntentID(s string)
- func (m *PaymentIntentMutation) SetStatus(pa paymentintent.Status)
- func (m *PaymentIntentMutation) SetUpdatedAt(t time.Time)
- func (m *PaymentIntentMutation) Status() (r paymentintent.Status, exists bool)
- func (m PaymentIntentMutation) Tx() (*Tx, error)
- func (m *PaymentIntentMutation) Type() string
- func (m *PaymentIntentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PaymentIntentMutation) Where(ps ...predicate.PaymentIntent)
- func (m *PaymentIntentMutation) WhereP(ps ...func(*sql.Selector))
- type PaymentIntentQuery
- func (_q *PaymentIntentQuery) Aggregate(fns ...AggregateFunc) *PaymentIntentSelect
- func (_q *PaymentIntentQuery) All(ctx context.Context) ([]*PaymentIntent, error)
- func (_q *PaymentIntentQuery) AllX(ctx context.Context) []*PaymentIntent
- func (_q *PaymentIntentQuery) Clone() *PaymentIntentQuery
- func (_q *PaymentIntentQuery) Count(ctx context.Context) (int, error)
- func (_q *PaymentIntentQuery) CountX(ctx context.Context) int
- func (_q *PaymentIntentQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PaymentIntentQuery) ExistX(ctx context.Context) bool
- func (_q *PaymentIntentQuery) First(ctx context.Context) (*PaymentIntent, error)
- func (_q *PaymentIntentQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PaymentIntentQuery) FirstIDX(ctx context.Context) int
- func (_q *PaymentIntentQuery) FirstX(ctx context.Context) *PaymentIntent
- func (_q *PaymentIntentQuery) GroupBy(field string, fields ...string) *PaymentIntentGroupBy
- func (_q *PaymentIntentQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PaymentIntentQuery) IDsX(ctx context.Context) []int
- func (_q *PaymentIntentQuery) Limit(limit int) *PaymentIntentQuery
- func (_q *PaymentIntentQuery) Offset(offset int) *PaymentIntentQuery
- func (_q *PaymentIntentQuery) Only(ctx context.Context) (*PaymentIntent, error)
- func (_q *PaymentIntentQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PaymentIntentQuery) OnlyIDX(ctx context.Context) int
- func (_q *PaymentIntentQuery) OnlyX(ctx context.Context) *PaymentIntent
- func (_q *PaymentIntentQuery) Order(o ...paymentintent.OrderOption) *PaymentIntentQuery
- func (_q *PaymentIntentQuery) QueryCustomer() *PaymentCustomerQuery
- func (_q *PaymentIntentQuery) Select(fields ...string) *PaymentIntentSelect
- func (_q *PaymentIntentQuery) Unique(unique bool) *PaymentIntentQuery
- func (_q *PaymentIntentQuery) Where(ps ...predicate.PaymentIntent) *PaymentIntentQuery
- func (_q *PaymentIntentQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *PaymentIntentQuery
- type PaymentIntentSelect
- func (_s *PaymentIntentSelect) Aggregate(fns ...AggregateFunc) *PaymentIntentSelect
- func (s *PaymentIntentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentIntentSelect) BoolX(ctx context.Context) bool
- func (s *PaymentIntentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentIntentSelect) BoolsX(ctx context.Context) []bool
- func (s *PaymentIntentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentIntentSelect) Float64X(ctx context.Context) float64
- func (s *PaymentIntentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentIntentSelect) Float64sX(ctx context.Context) []float64
- func (s *PaymentIntentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentIntentSelect) IntX(ctx context.Context) int
- func (s *PaymentIntentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentIntentSelect) IntsX(ctx context.Context) []int
- func (_s *PaymentIntentSelect) Scan(ctx context.Context, v any) error
- func (s *PaymentIntentSelect) ScanX(ctx context.Context, v any)
- func (s *PaymentIntentSelect) String(ctx context.Context) (_ string, err error)
- func (s *PaymentIntentSelect) StringX(ctx context.Context) string
- func (s *PaymentIntentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentIntentSelect) StringsX(ctx context.Context) []string
- type PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) AddAmount(v int64) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) ClearClientSecret() *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) ClearCustomer() *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) ClearDescription() *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) ClearMetadata() *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) Exec(ctx context.Context) error
- func (_u *PaymentIntentUpdate) ExecX(ctx context.Context)
- func (_u *PaymentIntentUpdate) Mutation() *PaymentIntentMutation
- func (_u *PaymentIntentUpdate) Save(ctx context.Context) (int, error)
- func (_u *PaymentIntentUpdate) SaveX(ctx context.Context) int
- func (_u *PaymentIntentUpdate) SetAmount(v int64) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetClientSecret(v string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetCurrency(v string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetCustomer(v *PaymentCustomer) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetCustomerID(id int) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetDescription(v string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetMetadata(v map[string]interface{}) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableAmount(v *int64) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableClientSecret(v *string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableCurrency(v *string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableDescription(v *string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableProvider(v *string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableProviderPaymentIntentID(v *string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetNillableStatus(v *paymentintent.Status) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetProvider(v string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetProviderPaymentIntentID(v string) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetStatus(v paymentintent.Status) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) SetUpdatedAt(v time.Time) *PaymentIntentUpdate
- func (_u *PaymentIntentUpdate) Where(ps ...predicate.PaymentIntent) *PaymentIntentUpdate
- type PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) AddAmount(v int64) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) ClearClientSecret() *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) ClearCustomer() *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) ClearDescription() *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) ClearMetadata() *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) Exec(ctx context.Context) error
- func (_u *PaymentIntentUpdateOne) ExecX(ctx context.Context)
- func (_u *PaymentIntentUpdateOne) Mutation() *PaymentIntentMutation
- func (_u *PaymentIntentUpdateOne) Save(ctx context.Context) (*PaymentIntent, error)
- func (_u *PaymentIntentUpdateOne) SaveX(ctx context.Context) *PaymentIntent
- func (_u *PaymentIntentUpdateOne) Select(field string, fields ...string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetAmount(v int64) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetClientSecret(v string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetCurrency(v string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetCustomer(v *PaymentCustomer) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetCustomerID(id int) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetDescription(v string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetMetadata(v map[string]interface{}) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableAmount(v *int64) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableClientSecret(v *string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableCurrency(v *string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableDescription(v *string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableProvider(v *string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableProviderPaymentIntentID(v *string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetNillableStatus(v *paymentintent.Status) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetProvider(v string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetProviderPaymentIntentID(v string) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetStatus(v paymentintent.Status) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) SetUpdatedAt(v time.Time) *PaymentIntentUpdateOne
- func (_u *PaymentIntentUpdateOne) Where(ps ...predicate.PaymentIntent) *PaymentIntentUpdateOne
- type PaymentIntents
- type PaymentMethod
- type PaymentMethodClient
- func (c *PaymentMethodClient) Create() *PaymentMethodCreate
- func (c *PaymentMethodClient) CreateBulk(builders ...*PaymentMethodCreate) *PaymentMethodCreateBulk
- func (c *PaymentMethodClient) Delete() *PaymentMethodDelete
- func (c *PaymentMethodClient) DeleteOne(_m *PaymentMethod) *PaymentMethodDeleteOne
- func (c *PaymentMethodClient) DeleteOneID(id int) *PaymentMethodDeleteOne
- func (c *PaymentMethodClient) Get(ctx context.Context, id int) (*PaymentMethod, error)
- func (c *PaymentMethodClient) GetX(ctx context.Context, id int) *PaymentMethod
- func (c *PaymentMethodClient) Hooks() []Hook
- func (c *PaymentMethodClient) Intercept(interceptors ...Interceptor)
- func (c *PaymentMethodClient) Interceptors() []Interceptor
- func (c *PaymentMethodClient) MapCreateBulk(slice any, setFunc func(*PaymentMethodCreate, int)) *PaymentMethodCreateBulk
- func (c *PaymentMethodClient) Query() *PaymentMethodQuery
- func (c *PaymentMethodClient) QueryCustomer(_m *PaymentMethod) *PaymentCustomerQuery
- func (c *PaymentMethodClient) Update() *PaymentMethodUpdate
- func (c *PaymentMethodClient) UpdateOne(_m *PaymentMethod) *PaymentMethodUpdateOne
- func (c *PaymentMethodClient) UpdateOneID(id int) *PaymentMethodUpdateOne
- func (c *PaymentMethodClient) Use(hooks ...Hook)
- type PaymentMethodCreate
- func (_c *PaymentMethodCreate) Exec(ctx context.Context) error
- func (_c *PaymentMethodCreate) ExecX(ctx context.Context)
- func (_c *PaymentMethodCreate) Mutation() *PaymentMethodMutation
- func (_c *PaymentMethodCreate) Save(ctx context.Context) (*PaymentMethod, error)
- func (_c *PaymentMethodCreate) SaveX(ctx context.Context) *PaymentMethod
- func (_c *PaymentMethodCreate) SetBrand(v string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetCreatedAt(v time.Time) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetCustomer(v *PaymentCustomer) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetCustomerID(id int) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetExpMonth(v int) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetExpYear(v int) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetIsDefault(v bool) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetLastFour(v string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetMetadata(v map[string]interface{}) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableBrand(v *string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableCreatedAt(v *time.Time) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableExpMonth(v *int) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableExpYear(v *int) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableIsDefault(v *bool) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableLastFour(v *string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableProvider(v *string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableType(v *paymentmethod.Type) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetNillableUpdatedAt(v *time.Time) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetProvider(v string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetProviderPaymentMethodID(v string) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetType(v paymentmethod.Type) *PaymentMethodCreate
- func (_c *PaymentMethodCreate) SetUpdatedAt(v time.Time) *PaymentMethodCreate
- type PaymentMethodCreateBulk
- type PaymentMethodDelete
- type PaymentMethodDeleteOne
- type PaymentMethodEdges
- type PaymentMethodGroupBy
- func (_g *PaymentMethodGroupBy) Aggregate(fns ...AggregateFunc) *PaymentMethodGroupBy
- func (s *PaymentMethodGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentMethodGroupBy) BoolX(ctx context.Context) bool
- func (s *PaymentMethodGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentMethodGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PaymentMethodGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentMethodGroupBy) Float64X(ctx context.Context) float64
- func (s *PaymentMethodGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentMethodGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PaymentMethodGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentMethodGroupBy) IntX(ctx context.Context) int
- func (s *PaymentMethodGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentMethodGroupBy) IntsX(ctx context.Context) []int
- func (_g *PaymentMethodGroupBy) Scan(ctx context.Context, v any) error
- func (s *PaymentMethodGroupBy) ScanX(ctx context.Context, v any)
- func (s *PaymentMethodGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PaymentMethodGroupBy) StringX(ctx context.Context) string
- func (s *PaymentMethodGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentMethodGroupBy) StringsX(ctx context.Context) []string
- type PaymentMethodMutation
- func (m *PaymentMethodMutation) AddExpMonth(i int)
- func (m *PaymentMethodMutation) AddExpYear(i int)
- func (m *PaymentMethodMutation) AddField(name string, value ent.Value) error
- func (m *PaymentMethodMutation) AddedEdges() []string
- func (m *PaymentMethodMutation) AddedExpMonth() (r int, exists bool)
- func (m *PaymentMethodMutation) AddedExpYear() (r int, exists bool)
- func (m *PaymentMethodMutation) AddedField(name string) (ent.Value, bool)
- func (m *PaymentMethodMutation) AddedFields() []string
- func (m *PaymentMethodMutation) AddedIDs(name string) []ent.Value
- func (m *PaymentMethodMutation) Brand() (r string, exists bool)
- func (m *PaymentMethodMutation) BrandCleared() bool
- func (m *PaymentMethodMutation) ClearBrand()
- func (m *PaymentMethodMutation) ClearCustomer()
- func (m *PaymentMethodMutation) ClearEdge(name string) error
- func (m *PaymentMethodMutation) ClearExpMonth()
- func (m *PaymentMethodMutation) ClearExpYear()
- func (m *PaymentMethodMutation) ClearField(name string) error
- func (m *PaymentMethodMutation) ClearLastFour()
- func (m *PaymentMethodMutation) ClearMetadata()
- func (m *PaymentMethodMutation) ClearedEdges() []string
- func (m *PaymentMethodMutation) ClearedFields() []string
- func (m PaymentMethodMutation) Client() *Client
- func (m *PaymentMethodMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PaymentMethodMutation) CustomerCleared() bool
- func (m *PaymentMethodMutation) CustomerID() (id int, exists bool)
- func (m *PaymentMethodMutation) CustomerIDs() (ids []int)
- func (m *PaymentMethodMutation) EdgeCleared(name string) bool
- func (m *PaymentMethodMutation) ExpMonth() (r int, exists bool)
- func (m *PaymentMethodMutation) ExpMonthCleared() bool
- func (m *PaymentMethodMutation) ExpYear() (r int, exists bool)
- func (m *PaymentMethodMutation) ExpYearCleared() bool
- func (m *PaymentMethodMutation) Field(name string) (ent.Value, bool)
- func (m *PaymentMethodMutation) FieldCleared(name string) bool
- func (m *PaymentMethodMutation) Fields() []string
- func (m *PaymentMethodMutation) GetType() (r paymentmethod.Type, exists bool)
- func (m *PaymentMethodMutation) ID() (id int, exists bool)
- func (m *PaymentMethodMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PaymentMethodMutation) IsDefault() (r bool, exists bool)
- func (m *PaymentMethodMutation) LastFour() (r string, exists bool)
- func (m *PaymentMethodMutation) LastFourCleared() bool
- func (m *PaymentMethodMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *PaymentMethodMutation) MetadataCleared() bool
- func (m *PaymentMethodMutation) OldBrand(ctx context.Context) (v string, err error)
- func (m *PaymentMethodMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentMethodMutation) OldExpMonth(ctx context.Context) (v int, err error)
- func (m *PaymentMethodMutation) OldExpYear(ctx context.Context) (v int, err error)
- func (m *PaymentMethodMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PaymentMethodMutation) OldIsDefault(ctx context.Context) (v bool, err error)
- func (m *PaymentMethodMutation) OldLastFour(ctx context.Context) (v string, err error)
- func (m *PaymentMethodMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *PaymentMethodMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *PaymentMethodMutation) OldProviderPaymentMethodID(ctx context.Context) (v string, err error)
- func (m *PaymentMethodMutation) OldType(ctx context.Context) (v paymentmethod.Type, err error)
- func (m *PaymentMethodMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentMethodMutation) Op() Op
- func (m *PaymentMethodMutation) Provider() (r string, exists bool)
- func (m *PaymentMethodMutation) ProviderPaymentMethodID() (r string, exists bool)
- func (m *PaymentMethodMutation) RemovedEdges() []string
- func (m *PaymentMethodMutation) RemovedIDs(name string) []ent.Value
- func (m *PaymentMethodMutation) ResetBrand()
- func (m *PaymentMethodMutation) ResetCreatedAt()
- func (m *PaymentMethodMutation) ResetCustomer()
- func (m *PaymentMethodMutation) ResetEdge(name string) error
- func (m *PaymentMethodMutation) ResetExpMonth()
- func (m *PaymentMethodMutation) ResetExpYear()
- func (m *PaymentMethodMutation) ResetField(name string) error
- func (m *PaymentMethodMutation) ResetIsDefault()
- func (m *PaymentMethodMutation) ResetLastFour()
- func (m *PaymentMethodMutation) ResetMetadata()
- func (m *PaymentMethodMutation) ResetProvider()
- func (m *PaymentMethodMutation) ResetProviderPaymentMethodID()
- func (m *PaymentMethodMutation) ResetType()
- func (m *PaymentMethodMutation) ResetUpdatedAt()
- func (m *PaymentMethodMutation) SetBrand(s string)
- func (m *PaymentMethodMutation) SetCreatedAt(t time.Time)
- func (m *PaymentMethodMutation) SetCustomerID(id int)
- func (m *PaymentMethodMutation) SetExpMonth(i int)
- func (m *PaymentMethodMutation) SetExpYear(i int)
- func (m *PaymentMethodMutation) SetField(name string, value ent.Value) error
- func (m *PaymentMethodMutation) SetIsDefault(b bool)
- func (m *PaymentMethodMutation) SetLastFour(s string)
- func (m *PaymentMethodMutation) SetMetadata(value map[string]interface{})
- func (m *PaymentMethodMutation) SetOp(op Op)
- func (m *PaymentMethodMutation) SetProvider(s string)
- func (m *PaymentMethodMutation) SetProviderPaymentMethodID(s string)
- func (m *PaymentMethodMutation) SetType(pa paymentmethod.Type)
- func (m *PaymentMethodMutation) SetUpdatedAt(t time.Time)
- func (m PaymentMethodMutation) Tx() (*Tx, error)
- func (m *PaymentMethodMutation) Type() string
- func (m *PaymentMethodMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PaymentMethodMutation) Where(ps ...predicate.PaymentMethod)
- func (m *PaymentMethodMutation) WhereP(ps ...func(*sql.Selector))
- type PaymentMethodQuery
- func (_q *PaymentMethodQuery) Aggregate(fns ...AggregateFunc) *PaymentMethodSelect
- func (_q *PaymentMethodQuery) All(ctx context.Context) ([]*PaymentMethod, error)
- func (_q *PaymentMethodQuery) AllX(ctx context.Context) []*PaymentMethod
- func (_q *PaymentMethodQuery) Clone() *PaymentMethodQuery
- func (_q *PaymentMethodQuery) Count(ctx context.Context) (int, error)
- func (_q *PaymentMethodQuery) CountX(ctx context.Context) int
- func (_q *PaymentMethodQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PaymentMethodQuery) ExistX(ctx context.Context) bool
- func (_q *PaymentMethodQuery) First(ctx context.Context) (*PaymentMethod, error)
- func (_q *PaymentMethodQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PaymentMethodQuery) FirstIDX(ctx context.Context) int
- func (_q *PaymentMethodQuery) FirstX(ctx context.Context) *PaymentMethod
- func (_q *PaymentMethodQuery) GroupBy(field string, fields ...string) *PaymentMethodGroupBy
- func (_q *PaymentMethodQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PaymentMethodQuery) IDsX(ctx context.Context) []int
- func (_q *PaymentMethodQuery) Limit(limit int) *PaymentMethodQuery
- func (_q *PaymentMethodQuery) Offset(offset int) *PaymentMethodQuery
- func (_q *PaymentMethodQuery) Only(ctx context.Context) (*PaymentMethod, error)
- func (_q *PaymentMethodQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PaymentMethodQuery) OnlyIDX(ctx context.Context) int
- func (_q *PaymentMethodQuery) OnlyX(ctx context.Context) *PaymentMethod
- func (_q *PaymentMethodQuery) Order(o ...paymentmethod.OrderOption) *PaymentMethodQuery
- func (_q *PaymentMethodQuery) QueryCustomer() *PaymentCustomerQuery
- func (_q *PaymentMethodQuery) Select(fields ...string) *PaymentMethodSelect
- func (_q *PaymentMethodQuery) Unique(unique bool) *PaymentMethodQuery
- func (_q *PaymentMethodQuery) Where(ps ...predicate.PaymentMethod) *PaymentMethodQuery
- func (_q *PaymentMethodQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *PaymentMethodQuery
- type PaymentMethodSelect
- func (_s *PaymentMethodSelect) Aggregate(fns ...AggregateFunc) *PaymentMethodSelect
- func (s *PaymentMethodSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentMethodSelect) BoolX(ctx context.Context) bool
- func (s *PaymentMethodSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentMethodSelect) BoolsX(ctx context.Context) []bool
- func (s *PaymentMethodSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentMethodSelect) Float64X(ctx context.Context) float64
- func (s *PaymentMethodSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentMethodSelect) Float64sX(ctx context.Context) []float64
- func (s *PaymentMethodSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentMethodSelect) IntX(ctx context.Context) int
- func (s *PaymentMethodSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentMethodSelect) IntsX(ctx context.Context) []int
- func (_s *PaymentMethodSelect) Scan(ctx context.Context, v any) error
- func (s *PaymentMethodSelect) ScanX(ctx context.Context, v any)
- func (s *PaymentMethodSelect) String(ctx context.Context) (_ string, err error)
- func (s *PaymentMethodSelect) StringX(ctx context.Context) string
- func (s *PaymentMethodSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentMethodSelect) StringsX(ctx context.Context) []string
- type PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) AddExpMonth(v int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) AddExpYear(v int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearBrand() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearCustomer() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearExpMonth() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearExpYear() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearLastFour() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) ClearMetadata() *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) Exec(ctx context.Context) error
- func (_u *PaymentMethodUpdate) ExecX(ctx context.Context)
- func (_u *PaymentMethodUpdate) Mutation() *PaymentMethodMutation
- func (_u *PaymentMethodUpdate) Save(ctx context.Context) (int, error)
- func (_u *PaymentMethodUpdate) SaveX(ctx context.Context) int
- func (_u *PaymentMethodUpdate) SetBrand(v string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetCustomer(v *PaymentCustomer) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetCustomerID(id int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetExpMonth(v int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetExpYear(v int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetIsDefault(v bool) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetLastFour(v string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetMetadata(v map[string]interface{}) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableBrand(v *string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableExpMonth(v *int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableExpYear(v *int) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableIsDefault(v *bool) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableLastFour(v *string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableProvider(v *string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableProviderPaymentMethodID(v *string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetNillableType(v *paymentmethod.Type) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetProvider(v string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetProviderPaymentMethodID(v string) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetType(v paymentmethod.Type) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) SetUpdatedAt(v time.Time) *PaymentMethodUpdate
- func (_u *PaymentMethodUpdate) Where(ps ...predicate.PaymentMethod) *PaymentMethodUpdate
- type PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) AddExpMonth(v int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) AddExpYear(v int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearBrand() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearCustomer() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearExpMonth() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearExpYear() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearLastFour() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) ClearMetadata() *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) Exec(ctx context.Context) error
- func (_u *PaymentMethodUpdateOne) ExecX(ctx context.Context)
- func (_u *PaymentMethodUpdateOne) Mutation() *PaymentMethodMutation
- func (_u *PaymentMethodUpdateOne) Save(ctx context.Context) (*PaymentMethod, error)
- func (_u *PaymentMethodUpdateOne) SaveX(ctx context.Context) *PaymentMethod
- func (_u *PaymentMethodUpdateOne) Select(field string, fields ...string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetBrand(v string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetCustomer(v *PaymentCustomer) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetCustomerID(id int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetExpMonth(v int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetExpYear(v int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetIsDefault(v bool) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetLastFour(v string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetMetadata(v map[string]interface{}) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableBrand(v *string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableExpMonth(v *int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableExpYear(v *int) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableIsDefault(v *bool) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableLastFour(v *string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableProvider(v *string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableProviderPaymentMethodID(v *string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetNillableType(v *paymentmethod.Type) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetProvider(v string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetProviderPaymentMethodID(v string) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetType(v paymentmethod.Type) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) SetUpdatedAt(v time.Time) *PaymentMethodUpdateOne
- func (_u *PaymentMethodUpdateOne) Where(ps ...predicate.PaymentMethod) *PaymentMethodUpdateOne
- type PaymentMethods
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscription
- type SubscriptionClient
- func (c *SubscriptionClient) Create() *SubscriptionCreate
- func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
- func (c *SubscriptionClient) Delete() *SubscriptionDelete
- func (c *SubscriptionClient) DeleteOne(_m *Subscription) *SubscriptionDeleteOne
- func (c *SubscriptionClient) DeleteOneID(id int) *SubscriptionDeleteOne
- func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
- func (c *SubscriptionClient) GetX(ctx context.Context, id int) *Subscription
- func (c *SubscriptionClient) Hooks() []Hook
- func (c *SubscriptionClient) Intercept(interceptors ...Interceptor)
- func (c *SubscriptionClient) Interceptors() []Interceptor
- func (c *SubscriptionClient) MapCreateBulk(slice any, setFunc func(*SubscriptionCreate, int)) *SubscriptionCreateBulk
- func (c *SubscriptionClient) Query() *SubscriptionQuery
- func (c *SubscriptionClient) QueryCustomer(_m *Subscription) *PaymentCustomerQuery
- func (c *SubscriptionClient) Update() *SubscriptionUpdate
- func (c *SubscriptionClient) UpdateOne(_m *Subscription) *SubscriptionUpdateOne
- func (c *SubscriptionClient) UpdateOneID(id int) *SubscriptionUpdateOne
- func (c *SubscriptionClient) Use(hooks ...Hook)
- type SubscriptionCreate
- func (_c *SubscriptionCreate) Exec(ctx context.Context) error
- func (_c *SubscriptionCreate) ExecX(ctx context.Context)
- func (_c *SubscriptionCreate) Mutation() *SubscriptionMutation
- func (_c *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
- func (_c *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
- func (_c *SubscriptionCreate) SetAmount(v int64) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCanceledAt(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCreatedAt(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCurrency(v string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCurrentPeriodEnd(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCurrentPeriodStart(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCustomer(v *PaymentCustomer) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetCustomerID(id int) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetEndedAt(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetInterval(v subscription.Interval) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetIntervalCount(v int) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetMetadata(v map[string]interface{}) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableCanceledAt(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableCurrency(v *string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableEndedAt(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableIntervalCount(v *int) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableProvider(v *string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableStatus(v *subscription.Status) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableTrialEnd(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableTrialStart(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetPriceID(v string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetProvider(v string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetProviderSubscriptionID(v string) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetStatus(v subscription.Status) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetTrialEnd(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetTrialStart(v time.Time) *SubscriptionCreate
- func (_c *SubscriptionCreate) SetUpdatedAt(v time.Time) *SubscriptionCreate
- type SubscriptionCreateBulk
- type SubscriptionDelete
- type SubscriptionDeleteOne
- type SubscriptionEdges
- type SubscriptionGroupBy
- func (_g *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
- func (s *SubscriptionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscriptionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscriptionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionGroupBy) IntX(ctx context.Context) int
- func (s *SubscriptionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionGroupBy) IntsX(ctx context.Context) []int
- func (_g *SubscriptionGroupBy) Scan(ctx context.Context, v any) error
- func (s *SubscriptionGroupBy) ScanX(ctx context.Context, v any)
- func (s *SubscriptionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionGroupBy) StringX(ctx context.Context) string
- func (s *SubscriptionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionGroupBy) StringsX(ctx context.Context) []string
- type SubscriptionMutation
- func (m *SubscriptionMutation) AddAmount(i int64)
- func (m *SubscriptionMutation) AddField(name string, value ent.Value) error
- func (m *SubscriptionMutation) AddIntervalCount(i int)
- func (m *SubscriptionMutation) AddedAmount() (r int64, exists bool)
- func (m *SubscriptionMutation) AddedEdges() []string
- func (m *SubscriptionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) AddedFields() []string
- func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) AddedIntervalCount() (r int, exists bool)
- func (m *SubscriptionMutation) Amount() (r int64, exists bool)
- func (m *SubscriptionMutation) CanceledAt() (r time.Time, exists bool)
- func (m *SubscriptionMutation) CanceledAtCleared() bool
- func (m *SubscriptionMutation) ClearCanceledAt()
- func (m *SubscriptionMutation) ClearCurrentPeriodEnd()
- func (m *SubscriptionMutation) ClearCurrentPeriodStart()
- func (m *SubscriptionMutation) ClearCustomer()
- func (m *SubscriptionMutation) ClearEdge(name string) error
- func (m *SubscriptionMutation) ClearEndedAt()
- func (m *SubscriptionMutation) ClearField(name string) error
- func (m *SubscriptionMutation) ClearMetadata()
- func (m *SubscriptionMutation) ClearTrialEnd()
- func (m *SubscriptionMutation) ClearTrialStart()
- func (m *SubscriptionMutation) ClearedEdges() []string
- func (m *SubscriptionMutation) ClearedFields() []string
- func (m SubscriptionMutation) Client() *Client
- func (m *SubscriptionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SubscriptionMutation) Currency() (r string, exists bool)
- func (m *SubscriptionMutation) CurrentPeriodEnd() (r time.Time, exists bool)
- func (m *SubscriptionMutation) CurrentPeriodEndCleared() bool
- func (m *SubscriptionMutation) CurrentPeriodStart() (r time.Time, exists bool)
- func (m *SubscriptionMutation) CurrentPeriodStartCleared() bool
- func (m *SubscriptionMutation) CustomerCleared() bool
- func (m *SubscriptionMutation) CustomerID() (id int, exists bool)
- func (m *SubscriptionMutation) CustomerIDs() (ids []int)
- func (m *SubscriptionMutation) EdgeCleared(name string) bool
- func (m *SubscriptionMutation) EndedAt() (r time.Time, exists bool)
- func (m *SubscriptionMutation) EndedAtCleared() bool
- func (m *SubscriptionMutation) Field(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) FieldCleared(name string) bool
- func (m *SubscriptionMutation) Fields() []string
- func (m *SubscriptionMutation) ID() (id int, exists bool)
- func (m *SubscriptionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SubscriptionMutation) Interval() (r subscription.Interval, exists bool)
- func (m *SubscriptionMutation) IntervalCount() (r int, exists bool)
- func (m *SubscriptionMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *SubscriptionMutation) MetadataCleared() bool
- func (m *SubscriptionMutation) OldAmount(ctx context.Context) (v int64, err error)
- func (m *SubscriptionMutation) OldCanceledAt(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldCurrency(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldCurrentPeriodEnd(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldCurrentPeriodStart(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldEndedAt(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionMutation) OldInterval(ctx context.Context) (v subscription.Interval, err error)
- func (m *SubscriptionMutation) OldIntervalCount(ctx context.Context) (v int, err error)
- func (m *SubscriptionMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *SubscriptionMutation) OldPriceID(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldProviderSubscriptionID(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldStatus(ctx context.Context) (v subscription.Status, err error)
- func (m *SubscriptionMutation) OldTrialEnd(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldTrialStart(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) Op() Op
- func (m *SubscriptionMutation) PriceID() (r string, exists bool)
- func (m *SubscriptionMutation) Provider() (r string, exists bool)
- func (m *SubscriptionMutation) ProviderSubscriptionID() (r string, exists bool)
- func (m *SubscriptionMutation) RemovedEdges() []string
- func (m *SubscriptionMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) ResetAmount()
- func (m *SubscriptionMutation) ResetCanceledAt()
- func (m *SubscriptionMutation) ResetCreatedAt()
- func (m *SubscriptionMutation) ResetCurrency()
- func (m *SubscriptionMutation) ResetCurrentPeriodEnd()
- func (m *SubscriptionMutation) ResetCurrentPeriodStart()
- func (m *SubscriptionMutation) ResetCustomer()
- func (m *SubscriptionMutation) ResetEdge(name string) error
- func (m *SubscriptionMutation) ResetEndedAt()
- func (m *SubscriptionMutation) ResetField(name string) error
- func (m *SubscriptionMutation) ResetInterval()
- func (m *SubscriptionMutation) ResetIntervalCount()
- func (m *SubscriptionMutation) ResetMetadata()
- func (m *SubscriptionMutation) ResetPriceID()
- func (m *SubscriptionMutation) ResetProvider()
- func (m *SubscriptionMutation) ResetProviderSubscriptionID()
- func (m *SubscriptionMutation) ResetStatus()
- func (m *SubscriptionMutation) ResetTrialEnd()
- func (m *SubscriptionMutation) ResetTrialStart()
- func (m *SubscriptionMutation) ResetUpdatedAt()
- func (m *SubscriptionMutation) SetAmount(i int64)
- func (m *SubscriptionMutation) SetCanceledAt(t time.Time)
- func (m *SubscriptionMutation) SetCreatedAt(t time.Time)
- func (m *SubscriptionMutation) SetCurrency(s string)
- func (m *SubscriptionMutation) SetCurrentPeriodEnd(t time.Time)
- func (m *SubscriptionMutation) SetCurrentPeriodStart(t time.Time)
- func (m *SubscriptionMutation) SetCustomerID(id int)
- func (m *SubscriptionMutation) SetEndedAt(t time.Time)
- func (m *SubscriptionMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionMutation) SetInterval(s subscription.Interval)
- func (m *SubscriptionMutation) SetIntervalCount(i int)
- func (m *SubscriptionMutation) SetMetadata(value map[string]interface{})
- func (m *SubscriptionMutation) SetOp(op Op)
- func (m *SubscriptionMutation) SetPriceID(s string)
- func (m *SubscriptionMutation) SetProvider(s string)
- func (m *SubscriptionMutation) SetProviderSubscriptionID(s string)
- func (m *SubscriptionMutation) SetStatus(s subscription.Status)
- func (m *SubscriptionMutation) SetTrialEnd(t time.Time)
- func (m *SubscriptionMutation) SetTrialStart(t time.Time)
- func (m *SubscriptionMutation) SetUpdatedAt(t time.Time)
- func (m *SubscriptionMutation) Status() (r subscription.Status, exists bool)
- func (m *SubscriptionMutation) TrialEnd() (r time.Time, exists bool)
- func (m *SubscriptionMutation) TrialEndCleared() bool
- func (m *SubscriptionMutation) TrialStart() (r time.Time, exists bool)
- func (m *SubscriptionMutation) TrialStartCleared() bool
- func (m SubscriptionMutation) Tx() (*Tx, error)
- func (m *SubscriptionMutation) Type() string
- func (m *SubscriptionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
- func (m *SubscriptionMutation) WhereP(ps ...func(*sql.Selector))
- type SubscriptionQuery
- func (_q *SubscriptionQuery) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
- func (_q *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
- func (_q *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
- func (_q *SubscriptionQuery) Clone() *SubscriptionQuery
- func (_q *SubscriptionQuery) Count(ctx context.Context) (int, error)
- func (_q *SubscriptionQuery) CountX(ctx context.Context) int
- func (_q *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *SubscriptionQuery) ExistX(ctx context.Context) bool
- func (_q *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
- func (_q *SubscriptionQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *SubscriptionQuery) FirstIDX(ctx context.Context) int
- func (_q *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
- func (_q *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
- func (_q *SubscriptionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *SubscriptionQuery) IDsX(ctx context.Context) []int
- func (_q *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
- func (_q *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
- func (_q *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
- func (_q *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *SubscriptionQuery) OnlyIDX(ctx context.Context) int
- func (_q *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
- func (_q *SubscriptionQuery) Order(o ...subscription.OrderOption) *SubscriptionQuery
- func (_q *SubscriptionQuery) QueryCustomer() *PaymentCustomerQuery
- func (_q *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
- func (_q *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
- func (_q *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
- func (_q *SubscriptionQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *SubscriptionQuery
- type SubscriptionSelect
- func (_s *SubscriptionSelect) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
- func (s *SubscriptionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionSelect) BoolX(ctx context.Context) bool
- func (s *SubscriptionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionSelect) Float64X(ctx context.Context) float64
- func (s *SubscriptionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionSelect) IntX(ctx context.Context) int
- func (s *SubscriptionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionSelect) IntsX(ctx context.Context) []int
- func (_s *SubscriptionSelect) Scan(ctx context.Context, v any) error
- func (s *SubscriptionSelect) ScanX(ctx context.Context, v any)
- func (s *SubscriptionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionSelect) StringX(ctx context.Context) string
- func (s *SubscriptionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionSelect) StringsX(ctx context.Context) []string
- type SubscriptionUpdate
- func (_u *SubscriptionUpdate) AddAmount(v int64) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) AddIntervalCount(v int) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearCanceledAt() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearCurrentPeriodEnd() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearCurrentPeriodStart() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearCustomer() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearEndedAt() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearMetadata() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearTrialEnd() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) ClearTrialStart() *SubscriptionUpdate
- func (_u *SubscriptionUpdate) Exec(ctx context.Context) error
- func (_u *SubscriptionUpdate) ExecX(ctx context.Context)
- func (_u *SubscriptionUpdate) Mutation() *SubscriptionMutation
- func (_u *SubscriptionUpdate) Save(ctx context.Context) (int, error)
- func (_u *SubscriptionUpdate) SaveX(ctx context.Context) int
- func (_u *SubscriptionUpdate) SetAmount(v int64) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCanceledAt(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCurrency(v string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCurrentPeriodEnd(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCurrentPeriodStart(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCustomer(v *PaymentCustomer) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetCustomerID(id int) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetEndedAt(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetInterval(v subscription.Interval) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetIntervalCount(v int) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetMetadata(v map[string]interface{}) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableAmount(v *int64) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableCanceledAt(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableCurrency(v *string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableEndedAt(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableInterval(v *subscription.Interval) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableIntervalCount(v *int) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillablePriceID(v *string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableProvider(v *string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableProviderSubscriptionID(v *string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableStatus(v *subscription.Status) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableTrialEnd(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetNillableTrialStart(v *time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetPriceID(v string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetProvider(v string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetProviderSubscriptionID(v string) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetStatus(v subscription.Status) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetTrialEnd(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetTrialStart(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) SetUpdatedAt(v time.Time) *SubscriptionUpdate
- func (_u *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
- type SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) AddAmount(v int64) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) AddIntervalCount(v int) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearCanceledAt() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearCurrentPeriodEnd() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearCurrentPeriodStart() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearCustomer() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearEndedAt() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearMetadata() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearTrialEnd() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) ClearTrialStart() *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) Exec(ctx context.Context) error
- func (_u *SubscriptionUpdateOne) ExecX(ctx context.Context)
- func (_u *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
- func (_u *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
- func (_u *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
- func (_u *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetAmount(v int64) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCanceledAt(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCurrency(v string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCurrentPeriodEnd(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCurrentPeriodStart(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCustomer(v *PaymentCustomer) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetCustomerID(id int) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetEndedAt(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetInterval(v subscription.Interval) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetIntervalCount(v int) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetMetadata(v map[string]interface{}) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableAmount(v *int64) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableCanceledAt(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableCurrency(v *string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableEndedAt(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableInterval(v *subscription.Interval) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableIntervalCount(v *int) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillablePriceID(v *string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableProvider(v *string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableProviderSubscriptionID(v *string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableStatus(v *subscription.Status) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableTrialEnd(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetNillableTrialStart(v *time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetPriceID(v string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetProvider(v string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetProviderSubscriptionID(v string) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetStatus(v subscription.Status) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetTrialEnd(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetTrialStart(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionUpdateOne
- func (_u *SubscriptionUpdateOne) Where(ps ...predicate.Subscription) *SubscriptionUpdateOne
- type Subscriptions
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (_m *User) QueryChatBans() *ChatBanQuery
- func (_m *User) QueryChatBansIssued() *ChatBanQuery
- func (_m *User) QueryChatMessages() *ChatMessageQuery
- func (_m *User) QueryOwnedChatRooms() *ChatRoomQuery
- func (_m *User) QueryOwner() *PasswordTokenQuery
- func (_m *User) QueryPaymentCustomer() *PaymentCustomerQuery
- func (_m *User) String() string
- func (_m *User) Unwrap() *User
- func (_m *User) Update() *UserUpdateOne
- func (_m *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(_m *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryChatBans(_m *User) *ChatBanQuery
- func (c *UserClient) QueryChatBansIssued(_m *User) *ChatBanQuery
- func (c *UserClient) QueryChatMessages(_m *User) *ChatMessageQuery
- func (c *UserClient) QueryOwnedChatRooms(_m *User) *ChatRoomQuery
- func (c *UserClient) QueryOwner(_m *User) *PasswordTokenQuery
- func (c *UserClient) QueryPaymentCustomer(_m *User) *PaymentCustomerQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(_m *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (_c *UserCreate) AddChatBanIDs(ids ...int) *UserCreate
- func (_c *UserCreate) AddChatBans(v ...*ChatBan) *UserCreate
- func (_c *UserCreate) AddChatBansIssued(v ...*ChatBan) *UserCreate
- func (_c *UserCreate) AddChatBansIssuedIDs(ids ...int) *UserCreate
- func (_c *UserCreate) AddChatMessageIDs(ids ...int) *UserCreate
- func (_c *UserCreate) AddChatMessages(v ...*ChatMessage) *UserCreate
- func (_c *UserCreate) AddOwnedChatRoomIDs(ids ...int) *UserCreate
- func (_c *UserCreate) AddOwnedChatRooms(v ...*ChatRoom) *UserCreate
- func (_c *UserCreate) AddOwner(v ...*PasswordToken) *UserCreate
- func (_c *UserCreate) AddOwnerIDs(ids ...int) *UserCreate
- func (_c *UserCreate) Exec(ctx context.Context) error
- func (_c *UserCreate) ExecX(ctx context.Context)
- func (_c *UserCreate) Mutation() *UserMutation
- func (_c *UserCreate) Save(ctx context.Context) (*User, error)
- func (_c *UserCreate) SaveX(ctx context.Context) *User
- func (_c *UserCreate) SetAdmin(v bool) *UserCreate
- func (_c *UserCreate) SetCreatedAt(v time.Time) *UserCreate
- func (_c *UserCreate) SetEmail(v string) *UserCreate
- func (_c *UserCreate) SetName(v string) *UserCreate
- func (_c *UserCreate) SetNillableAdmin(v *bool) *UserCreate
- func (_c *UserCreate) SetNillableCreatedAt(v *time.Time) *UserCreate
- func (_c *UserCreate) SetNillablePaymentCustomerID(id *int) *UserCreate
- func (_c *UserCreate) SetNillableVerified(v *bool) *UserCreate
- func (_c *UserCreate) SetPassword(v string) *UserCreate
- func (_c *UserCreate) SetPaymentCustomer(v *PaymentCustomer) *UserCreate
- func (_c *UserCreate) SetPaymentCustomerID(id int) *UserCreate
- func (_c *UserCreate) SetVerified(v bool) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) ChatBansIssuedOrErr() ([]*ChatBan, error)
- func (e UserEdges) ChatBansOrErr() ([]*ChatBan, error)
- func (e UserEdges) ChatMessagesOrErr() ([]*ChatMessage, error)
- func (e UserEdges) OwnedChatRoomsOrErr() ([]*ChatRoom, error)
- func (e UserEdges) OwnerOrErr() ([]*PasswordToken, error)
- func (e UserEdges) PaymentCustomerOrErr() (*PaymentCustomer, error)
- type UserGroupBy
- func (_g *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (_g *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddChatBanIDs(ids ...int)
- func (m *UserMutation) AddChatBansIssuedIDs(ids ...int)
- func (m *UserMutation) AddChatMessageIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddOwnedChatRoomIDs(ids ...int)
- func (m *UserMutation) AddOwnerIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) Admin() (r bool, exists bool)
- func (m *UserMutation) ChatBansCleared() bool
- func (m *UserMutation) ChatBansIDs() (ids []int)
- func (m *UserMutation) ChatBansIssuedCleared() bool
- func (m *UserMutation) ChatBansIssuedIDs() (ids []int)
- func (m *UserMutation) ChatMessagesCleared() bool
- func (m *UserMutation) ChatMessagesIDs() (ids []int)
- func (m *UserMutation) ClearChatBans()
- func (m *UserMutation) ClearChatBansIssued()
- func (m *UserMutation) ClearChatMessages()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearOwnedChatRooms()
- func (m *UserMutation) ClearOwner()
- func (m *UserMutation) ClearPaymentCustomer()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldVerified(ctx context.Context) (v bool, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) OwnedChatRoomsCleared() bool
- func (m *UserMutation) OwnedChatRoomsIDs() (ids []int)
- func (m *UserMutation) OwnerCleared() bool
- func (m *UserMutation) OwnerIDs() (ids []int)
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PaymentCustomerCleared() bool
- func (m *UserMutation) PaymentCustomerID() (id int, exists bool)
- func (m *UserMutation) PaymentCustomerIDs() (ids []int)
- func (m *UserMutation) RemoveChatBanIDs(ids ...int)
- func (m *UserMutation) RemoveChatBansIssuedIDs(ids ...int)
- func (m *UserMutation) RemoveChatMessageIDs(ids ...int)
- func (m *UserMutation) RemoveOwnedChatRoomIDs(ids ...int)
- func (m *UserMutation) RemoveOwnerIDs(ids ...int)
- func (m *UserMutation) RemovedChatBansIDs() (ids []int)
- func (m *UserMutation) RemovedChatBansIssuedIDs() (ids []int)
- func (m *UserMutation) RemovedChatMessagesIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedOwnedChatRoomsIDs() (ids []int)
- func (m *UserMutation) RemovedOwnerIDs() (ids []int)
- func (m *UserMutation) ResetAdmin()
- func (m *UserMutation) ResetChatBans()
- func (m *UserMutation) ResetChatBansIssued()
- func (m *UserMutation) ResetChatMessages()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetOwnedChatRooms()
- func (m *UserMutation) ResetOwner()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPaymentCustomer()
- func (m *UserMutation) ResetVerified()
- func (m *UserMutation) SetAdmin(b bool)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPaymentCustomerID(id int)
- func (m *UserMutation) SetVerified(b bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Verified() (r bool, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (_q *UserQuery) All(ctx context.Context) ([]*User, error)
- func (_q *UserQuery) AllX(ctx context.Context) []*User
- func (_q *UserQuery) Clone() *UserQuery
- func (_q *UserQuery) Count(ctx context.Context) (int, error)
- func (_q *UserQuery) CountX(ctx context.Context) int
- func (_q *UserQuery) Exist(ctx context.Context) (bool, error)
- func (_q *UserQuery) ExistX(ctx context.Context) bool
- func (_q *UserQuery) First(ctx context.Context) (*User, error)
- func (_q *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *UserQuery) FirstIDX(ctx context.Context) int
- func (_q *UserQuery) FirstX(ctx context.Context) *User
- func (_q *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (_q *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *UserQuery) IDsX(ctx context.Context) []int
- func (_q *UserQuery) Limit(limit int) *UserQuery
- func (_q *UserQuery) Offset(offset int) *UserQuery
- func (_q *UserQuery) Only(ctx context.Context) (*User, error)
- func (_q *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *UserQuery) OnlyIDX(ctx context.Context) int
- func (_q *UserQuery) OnlyX(ctx context.Context) *User
- func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (_q *UserQuery) QueryChatBans() *ChatBanQuery
- func (_q *UserQuery) QueryChatBansIssued() *ChatBanQuery
- func (_q *UserQuery) QueryChatMessages() *ChatMessageQuery
- func (_q *UserQuery) QueryOwnedChatRooms() *ChatRoomQuery
- func (_q *UserQuery) QueryOwner() *PasswordTokenQuery
- func (_q *UserQuery) QueryPaymentCustomer() *PaymentCustomerQuery
- func (_q *UserQuery) Select(fields ...string) *UserSelect
- func (_q *UserQuery) Unique(unique bool) *UserQuery
- func (_q *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (_q *UserQuery) WithChatBans(opts ...func(*ChatBanQuery)) *UserQuery
- func (_q *UserQuery) WithChatBansIssued(opts ...func(*ChatBanQuery)) *UserQuery
- func (_q *UserQuery) WithChatMessages(opts ...func(*ChatMessageQuery)) *UserQuery
- func (_q *UserQuery) WithOwnedChatRooms(opts ...func(*ChatRoomQuery)) *UserQuery
- func (_q *UserQuery) WithOwner(opts ...func(*PasswordTokenQuery)) *UserQuery
- func (_q *UserQuery) WithPaymentCustomer(opts ...func(*PaymentCustomerQuery)) *UserQuery
- type UserSelect
- func (_s *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (_s *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (_u *UserUpdate) AddChatBanIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) AddChatBans(v ...*ChatBan) *UserUpdate
- func (_u *UserUpdate) AddChatBansIssued(v ...*ChatBan) *UserUpdate
- func (_u *UserUpdate) AddChatBansIssuedIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) AddChatMessageIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) AddChatMessages(v ...*ChatMessage) *UserUpdate
- func (_u *UserUpdate) AddOwnedChatRoomIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) AddOwnedChatRooms(v ...*ChatRoom) *UserUpdate
- func (_u *UserUpdate) AddOwner(v ...*PasswordToken) *UserUpdate
- func (_u *UserUpdate) AddOwnerIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) ClearChatBans() *UserUpdate
- func (_u *UserUpdate) ClearChatBansIssued() *UserUpdate
- func (_u *UserUpdate) ClearChatMessages() *UserUpdate
- func (_u *UserUpdate) ClearOwnedChatRooms() *UserUpdate
- func (_u *UserUpdate) ClearOwner() *UserUpdate
- func (_u *UserUpdate) ClearPaymentCustomer() *UserUpdate
- func (_u *UserUpdate) Exec(ctx context.Context) error
- func (_u *UserUpdate) ExecX(ctx context.Context)
- func (_u *UserUpdate) Mutation() *UserMutation
- func (_u *UserUpdate) RemoveChatBanIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) RemoveChatBans(v ...*ChatBan) *UserUpdate
- func (_u *UserUpdate) RemoveChatBansIssued(v ...*ChatBan) *UserUpdate
- func (_u *UserUpdate) RemoveChatBansIssuedIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) RemoveChatMessageIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) RemoveChatMessages(v ...*ChatMessage) *UserUpdate
- func (_u *UserUpdate) RemoveOwnedChatRoomIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) RemoveOwnedChatRooms(v ...*ChatRoom) *UserUpdate
- func (_u *UserUpdate) RemoveOwner(v ...*PasswordToken) *UserUpdate
- func (_u *UserUpdate) RemoveOwnerIDs(ids ...int) *UserUpdate
- func (_u *UserUpdate) Save(ctx context.Context) (int, error)
- func (_u *UserUpdate) SaveX(ctx context.Context) int
- func (_u *UserUpdate) SetAdmin(v bool) *UserUpdate
- func (_u *UserUpdate) SetEmail(v string) *UserUpdate
- func (_u *UserUpdate) SetName(v string) *UserUpdate
- func (_u *UserUpdate) SetNillableAdmin(v *bool) *UserUpdate
- func (_u *UserUpdate) SetNillableEmail(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillableName(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillablePassword(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillablePaymentCustomerID(id *int) *UserUpdate
- func (_u *UserUpdate) SetNillableVerified(v *bool) *UserUpdate
- func (_u *UserUpdate) SetPassword(v string) *UserUpdate
- func (_u *UserUpdate) SetPaymentCustomer(v *PaymentCustomer) *UserUpdate
- func (_u *UserUpdate) SetPaymentCustomerID(id int) *UserUpdate
- func (_u *UserUpdate) SetVerified(v bool) *UserUpdate
- func (_u *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (_u *UserUpdateOne) AddChatBanIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) AddChatBans(v ...*ChatBan) *UserUpdateOne
- func (_u *UserUpdateOne) AddChatBansIssued(v ...*ChatBan) *UserUpdateOne
- func (_u *UserUpdateOne) AddChatBansIssuedIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) AddChatMessageIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) AddChatMessages(v ...*ChatMessage) *UserUpdateOne
- func (_u *UserUpdateOne) AddOwnedChatRoomIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) AddOwnedChatRooms(v ...*ChatRoom) *UserUpdateOne
- func (_u *UserUpdateOne) AddOwner(v ...*PasswordToken) *UserUpdateOne
- func (_u *UserUpdateOne) AddOwnerIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) ClearChatBans() *UserUpdateOne
- func (_u *UserUpdateOne) ClearChatBansIssued() *UserUpdateOne
- func (_u *UserUpdateOne) ClearChatMessages() *UserUpdateOne
- func (_u *UserUpdateOne) ClearOwnedChatRooms() *UserUpdateOne
- func (_u *UserUpdateOne) ClearOwner() *UserUpdateOne
- func (_u *UserUpdateOne) ClearPaymentCustomer() *UserUpdateOne
- func (_u *UserUpdateOne) Exec(ctx context.Context) error
- func (_u *UserUpdateOne) ExecX(ctx context.Context)
- func (_u *UserUpdateOne) Mutation() *UserMutation
- func (_u *UserUpdateOne) RemoveChatBanIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveChatBans(v ...*ChatBan) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveChatBansIssued(v ...*ChatBan) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveChatBansIssuedIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveChatMessageIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveChatMessages(v ...*ChatMessage) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveOwnedChatRoomIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveOwnedChatRooms(v ...*ChatRoom) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveOwner(v ...*PasswordToken) *UserUpdateOne
- func (_u *UserUpdateOne) RemoveOwnerIDs(ids ...int) *UserUpdateOne
- func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (_u *UserUpdateOne) SaveX(ctx context.Context) *User
- func (_u *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (_u *UserUpdateOne) SetAdmin(v bool) *UserUpdateOne
- func (_u *UserUpdateOne) SetEmail(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetName(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableAdmin(v *bool) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableEmail(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableName(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillablePassword(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillablePaymentCustomerID(id *int) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableVerified(v *bool) *UserUpdateOne
- func (_u *UserUpdateOne) SetPassword(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetPaymentCustomer(v *PaymentCustomer) *UserUpdateOne
- func (_u *UserUpdateOne) SetPaymentCustomerID(id int) *UserUpdateOne
- func (_u *UserUpdateOne) SetVerified(v bool) *UserUpdateOne
- func (_u *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeChatBan = "ChatBan" TypeChatMessage = "ChatMessage" TypeChatRoom = "ChatRoom" TypePasswordToken = "PasswordToken" TypePaymentCustomer = "PaymentCustomer" TypePaymentIntent = "PaymentIntent" TypePaymentMethod = "PaymentMethod" TypeSubscription = "Subscription" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type ChatBan ¶
type ChatBan struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// IPHash holds the value of the "ip_hash" field.
IPHash string `json:"ip_hash,omitempty"`
// Reason holds the value of the "reason" field.
Reason string `json:"reason,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ChatBanQuery when eager-loading is set.
Edges ChatBanEdges `json:"edges"`
// contains filtered or unexported fields
}
ChatBan is the model entity for the ChatBan schema.
func (*ChatBan) QueryBannedByUser ¶
QueryBannedByUser queries the "banned_by_user" edge of the ChatBan entity.
func (*ChatBan) QueryRoom ¶
func (_m *ChatBan) QueryRoom() *ChatRoomQuery
QueryRoom queries the "room" edge of the ChatBan entity.
func (*ChatBan) Unwrap ¶
Unwrap unwraps the ChatBan entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*ChatBan) Update ¶
func (_m *ChatBan) Update() *ChatBanUpdateOne
Update returns a builder for updating this ChatBan. Note that you need to call ChatBan.Unwrap() before calling this method if this ChatBan was returned from a transaction, and the transaction was committed or rolled back.
type ChatBanClient ¶
type ChatBanClient struct {
// contains filtered or unexported fields
}
ChatBanClient is a client for the ChatBan schema.
func NewChatBanClient ¶
func NewChatBanClient(c config) *ChatBanClient
NewChatBanClient returns a client for the ChatBan from the given config.
func (*ChatBanClient) Create ¶
func (c *ChatBanClient) Create() *ChatBanCreate
Create returns a builder for creating a ChatBan entity.
func (*ChatBanClient) CreateBulk ¶
func (c *ChatBanClient) CreateBulk(builders ...*ChatBanCreate) *ChatBanCreateBulk
CreateBulk returns a builder for creating a bulk of ChatBan entities.
func (*ChatBanClient) Delete ¶
func (c *ChatBanClient) Delete() *ChatBanDelete
Delete returns a delete builder for ChatBan.
func (*ChatBanClient) DeleteOne ¶
func (c *ChatBanClient) DeleteOne(_m *ChatBan) *ChatBanDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatBanClient) DeleteOneID ¶
func (c *ChatBanClient) DeleteOneID(id int) *ChatBanDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatBanClient) GetX ¶
func (c *ChatBanClient) GetX(ctx context.Context, id int) *ChatBan
GetX is like Get, but panics if an error occurs.
func (*ChatBanClient) Hooks ¶
func (c *ChatBanClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChatBanClient) Intercept ¶
func (c *ChatBanClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chatban.Intercept(f(g(h())))`.
func (*ChatBanClient) Interceptors ¶
func (c *ChatBanClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatBanClient) MapCreateBulk ¶
func (c *ChatBanClient) MapCreateBulk(slice any, setFunc func(*ChatBanCreate, int)) *ChatBanCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChatBanClient) Query ¶
func (c *ChatBanClient) Query() *ChatBanQuery
Query returns a query builder for ChatBan.
func (*ChatBanClient) QueryBannedByUser ¶
func (c *ChatBanClient) QueryBannedByUser(_m *ChatBan) *UserQuery
QueryBannedByUser queries the banned_by_user edge of a ChatBan.
func (*ChatBanClient) QueryRoom ¶
func (c *ChatBanClient) QueryRoom(_m *ChatBan) *ChatRoomQuery
QueryRoom queries the room edge of a ChatBan.
func (*ChatBanClient) QueryUser ¶
func (c *ChatBanClient) QueryUser(_m *ChatBan) *UserQuery
QueryUser queries the user edge of a ChatBan.
func (*ChatBanClient) Update ¶
func (c *ChatBanClient) Update() *ChatBanUpdate
Update returns an update builder for ChatBan.
func (*ChatBanClient) UpdateOne ¶
func (c *ChatBanClient) UpdateOne(_m *ChatBan) *ChatBanUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatBanClient) UpdateOneID ¶
func (c *ChatBanClient) UpdateOneID(id int) *ChatBanUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatBanClient) Use ¶
func (c *ChatBanClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chatban.Hooks(f(g(h())))`.
type ChatBanCreate ¶
type ChatBanCreate struct {
// contains filtered or unexported fields
}
ChatBanCreate is the builder for creating a ChatBan entity.
func (*ChatBanCreate) Exec ¶
func (_c *ChatBanCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatBanCreate) ExecX ¶
func (_c *ChatBanCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatBanCreate) Mutation ¶
func (_c *ChatBanCreate) Mutation() *ChatBanMutation
Mutation returns the ChatBanMutation object of the builder.
func (*ChatBanCreate) Save ¶
func (_c *ChatBanCreate) Save(ctx context.Context) (*ChatBan, error)
Save creates the ChatBan in the database.
func (*ChatBanCreate) SaveX ¶
func (_c *ChatBanCreate) SaveX(ctx context.Context) *ChatBan
SaveX calls Save and panics if Save returns an error.
func (*ChatBanCreate) SetBannedByUser ¶
func (_c *ChatBanCreate) SetBannedByUser(v *User) *ChatBanCreate
SetBannedByUser sets the "banned_by_user" edge to the User entity.
func (*ChatBanCreate) SetBannedByUserID ¶
func (_c *ChatBanCreate) SetBannedByUserID(id int) *ChatBanCreate
SetBannedByUserID sets the "banned_by_user" edge to the User entity by ID.
func (*ChatBanCreate) SetCreatedAt ¶
func (_c *ChatBanCreate) SetCreatedAt(v time.Time) *ChatBanCreate
SetCreatedAt sets the "created_at" field.
func (*ChatBanCreate) SetIPHash ¶
func (_c *ChatBanCreate) SetIPHash(v string) *ChatBanCreate
SetIPHash sets the "ip_hash" field.
func (*ChatBanCreate) SetNillableCreatedAt ¶
func (_c *ChatBanCreate) SetNillableCreatedAt(v *time.Time) *ChatBanCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatBanCreate) SetNillableIPHash ¶
func (_c *ChatBanCreate) SetNillableIPHash(v *string) *ChatBanCreate
SetNillableIPHash sets the "ip_hash" field if the given value is not nil.
func (*ChatBanCreate) SetNillableReason ¶
func (_c *ChatBanCreate) SetNillableReason(v *string) *ChatBanCreate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*ChatBanCreate) SetNillableUserID ¶
func (_c *ChatBanCreate) SetNillableUserID(id *int) *ChatBanCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ChatBanCreate) SetReason ¶
func (_c *ChatBanCreate) SetReason(v string) *ChatBanCreate
SetReason sets the "reason" field.
func (*ChatBanCreate) SetRoom ¶
func (_c *ChatBanCreate) SetRoom(v *ChatRoom) *ChatBanCreate
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatBanCreate) SetRoomID ¶
func (_c *ChatBanCreate) SetRoomID(id int) *ChatBanCreate
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatBanCreate) SetUser ¶
func (_c *ChatBanCreate) SetUser(v *User) *ChatBanCreate
SetUser sets the "user" edge to the User entity.
func (*ChatBanCreate) SetUserID ¶
func (_c *ChatBanCreate) SetUserID(id int) *ChatBanCreate
SetUserID sets the "user" edge to the User entity by ID.
type ChatBanCreateBulk ¶
type ChatBanCreateBulk struct {
// contains filtered or unexported fields
}
ChatBanCreateBulk is the builder for creating many ChatBan entities in bulk.
func (*ChatBanCreateBulk) Exec ¶
func (_c *ChatBanCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatBanCreateBulk) ExecX ¶
func (_c *ChatBanCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChatBanDelete ¶
type ChatBanDelete struct {
// contains filtered or unexported fields
}
ChatBanDelete is the builder for deleting a ChatBan entity.
func (*ChatBanDelete) Exec ¶
func (_d *ChatBanDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatBanDelete) ExecX ¶
func (_d *ChatBanDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatBanDelete) Where ¶
func (_d *ChatBanDelete) Where(ps ...predicate.ChatBan) *ChatBanDelete
Where appends a list predicates to the ChatBanDelete builder.
type ChatBanDeleteOne ¶
type ChatBanDeleteOne struct {
// contains filtered or unexported fields
}
ChatBanDeleteOne is the builder for deleting a single ChatBan entity.
func (*ChatBanDeleteOne) Exec ¶
func (_d *ChatBanDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatBanDeleteOne) ExecX ¶
func (_d *ChatBanDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatBanDeleteOne) Where ¶
func (_d *ChatBanDeleteOne) Where(ps ...predicate.ChatBan) *ChatBanDeleteOne
Where appends a list predicates to the ChatBanDelete builder.
type ChatBanEdges ¶
type ChatBanEdges struct {
// Room holds the value of the room edge.
Room *ChatRoom `json:"room,omitempty"`
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// BannedByUser holds the value of the banned_by_user edge.
BannedByUser *User `json:"banned_by_user,omitempty"`
// contains filtered or unexported fields
}
ChatBanEdges holds the relations/edges for other nodes in the graph.
func (ChatBanEdges) BannedByUserOrErr ¶
func (e ChatBanEdges) BannedByUserOrErr() (*User, error)
BannedByUserOrErr returns the BannedByUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ChatBanEdges) RoomOrErr ¶
func (e ChatBanEdges) RoomOrErr() (*ChatRoom, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ChatBanEdges) UserOrErr ¶
func (e ChatBanEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ChatBanGroupBy ¶
type ChatBanGroupBy struct {
// contains filtered or unexported fields
}
ChatBanGroupBy is the group-by builder for ChatBan entities.
func (*ChatBanGroupBy) Aggregate ¶
func (_g *ChatBanGroupBy) Aggregate(fns ...AggregateFunc) *ChatBanGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatBanGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatBanGroupBy) Scan ¶
func (_g *ChatBanGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatBanGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatBanMutation ¶
type ChatBanMutation struct {
// contains filtered or unexported fields
}
ChatBanMutation represents an operation that mutates the ChatBan nodes in the graph.
func (*ChatBanMutation) AddField ¶
func (m *ChatBanMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatBanMutation) AddedEdges ¶
func (m *ChatBanMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatBanMutation) AddedField ¶
func (m *ChatBanMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatBanMutation) AddedFields ¶
func (m *ChatBanMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatBanMutation) AddedIDs ¶
func (m *ChatBanMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatBanMutation) BannedByUserCleared ¶
func (m *ChatBanMutation) BannedByUserCleared() bool
BannedByUserCleared reports if the "banned_by_user" edge to the User entity was cleared.
func (*ChatBanMutation) BannedByUserID ¶
func (m *ChatBanMutation) BannedByUserID() (id int, exists bool)
BannedByUserID returns the "banned_by_user" edge ID in the mutation.
func (*ChatBanMutation) BannedByUserIDs ¶
func (m *ChatBanMutation) BannedByUserIDs() (ids []int)
BannedByUserIDs returns the "banned_by_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BannedByUserID instead. It exists only for internal usage by the builders.
func (*ChatBanMutation) ClearBannedByUser ¶
func (m *ChatBanMutation) ClearBannedByUser()
ClearBannedByUser clears the "banned_by_user" edge to the User entity.
func (*ChatBanMutation) ClearEdge ¶
func (m *ChatBanMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ChatBanMutation) ClearField ¶
func (m *ChatBanMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatBanMutation) ClearIPHash ¶
func (m *ChatBanMutation) ClearIPHash()
ClearIPHash clears the value of the "ip_hash" field.
func (*ChatBanMutation) ClearReason ¶
func (m *ChatBanMutation) ClearReason()
ClearReason clears the value of the "reason" field.
func (*ChatBanMutation) ClearRoom ¶
func (m *ChatBanMutation) ClearRoom()
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatBanMutation) ClearUser ¶
func (m *ChatBanMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ChatBanMutation) ClearedEdges ¶
func (m *ChatBanMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatBanMutation) ClearedFields ¶
func (m *ChatBanMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatBanMutation) Client ¶
func (m ChatBanMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ChatBanMutation) CreatedAt ¶
func (m *ChatBanMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChatBanMutation) EdgeCleared ¶
func (m *ChatBanMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatBanMutation) Field ¶
func (m *ChatBanMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatBanMutation) FieldCleared ¶
func (m *ChatBanMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatBanMutation) Fields ¶
func (m *ChatBanMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ChatBanMutation) ID ¶
func (m *ChatBanMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ChatBanMutation) IDs ¶
func (m *ChatBanMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ChatBanMutation) IPHash ¶
func (m *ChatBanMutation) IPHash() (r string, exists bool)
IPHash returns the value of the "ip_hash" field in the mutation.
func (*ChatBanMutation) IPHashCleared ¶
func (m *ChatBanMutation) IPHashCleared() bool
IPHashCleared returns if the "ip_hash" field was cleared in this mutation.
func (*ChatBanMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ChatBan entity. If the ChatBan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatBanMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ChatBanMutation) OldIPHash ¶
func (m *ChatBanMutation) OldIPHash(ctx context.Context) (v string, err error)
OldIPHash returns the old "ip_hash" field's value of the ChatBan entity. If the ChatBan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatBanMutation) OldReason ¶
func (m *ChatBanMutation) OldReason(ctx context.Context) (v string, err error)
OldReason returns the old "reason" field's value of the ChatBan entity. If the ChatBan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatBanMutation) Reason ¶
func (m *ChatBanMutation) Reason() (r string, exists bool)
Reason returns the value of the "reason" field in the mutation.
func (*ChatBanMutation) ReasonCleared ¶
func (m *ChatBanMutation) ReasonCleared() bool
ReasonCleared returns if the "reason" field was cleared in this mutation.
func (*ChatBanMutation) RemovedEdges ¶
func (m *ChatBanMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatBanMutation) RemovedIDs ¶
func (m *ChatBanMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ChatBanMutation) ResetBannedByUser ¶
func (m *ChatBanMutation) ResetBannedByUser()
ResetBannedByUser resets all changes to the "banned_by_user" edge.
func (*ChatBanMutation) ResetCreatedAt ¶
func (m *ChatBanMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChatBanMutation) ResetEdge ¶
func (m *ChatBanMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ChatBanMutation) ResetField ¶
func (m *ChatBanMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatBanMutation) ResetIPHash ¶
func (m *ChatBanMutation) ResetIPHash()
ResetIPHash resets all changes to the "ip_hash" field.
func (*ChatBanMutation) ResetReason ¶
func (m *ChatBanMutation) ResetReason()
ResetReason resets all changes to the "reason" field.
func (*ChatBanMutation) ResetRoom ¶
func (m *ChatBanMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*ChatBanMutation) ResetUser ¶
func (m *ChatBanMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ChatBanMutation) RoomCleared ¶
func (m *ChatBanMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the ChatRoom entity was cleared.
func (*ChatBanMutation) RoomID ¶
func (m *ChatBanMutation) RoomID() (id int, exists bool)
RoomID returns the "room" edge ID in the mutation.
func (*ChatBanMutation) RoomIDs ¶
func (m *ChatBanMutation) RoomIDs() (ids []int)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*ChatBanMutation) SetBannedByUserID ¶
func (m *ChatBanMutation) SetBannedByUserID(id int)
SetBannedByUserID sets the "banned_by_user" edge to the User entity by id.
func (*ChatBanMutation) SetCreatedAt ¶
func (m *ChatBanMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChatBanMutation) SetField ¶
func (m *ChatBanMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatBanMutation) SetIPHash ¶
func (m *ChatBanMutation) SetIPHash(s string)
SetIPHash sets the "ip_hash" field.
func (*ChatBanMutation) SetOp ¶
func (m *ChatBanMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatBanMutation) SetReason ¶
func (m *ChatBanMutation) SetReason(s string)
SetReason sets the "reason" field.
func (*ChatBanMutation) SetRoomID ¶
func (m *ChatBanMutation) SetRoomID(id int)
SetRoomID sets the "room" edge to the ChatRoom entity by id.
func (*ChatBanMutation) SetUserID ¶
func (m *ChatBanMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (ChatBanMutation) Tx ¶
func (m ChatBanMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatBanMutation) Type ¶
func (m *ChatBanMutation) Type() string
Type returns the node type of this mutation (ChatBan).
func (*ChatBanMutation) UserCleared ¶
func (m *ChatBanMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ChatBanMutation) UserID ¶
func (m *ChatBanMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*ChatBanMutation) UserIDs ¶
func (m *ChatBanMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ChatBanMutation) Where ¶
func (m *ChatBanMutation) Where(ps ...predicate.ChatBan)
Where appends a list predicates to the ChatBanMutation builder.
func (*ChatBanMutation) WhereP ¶
func (m *ChatBanMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatBanMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatBanQuery ¶
type ChatBanQuery struct {
// contains filtered or unexported fields
}
ChatBanQuery is the builder for querying ChatBan entities.
func (*ChatBanQuery) Aggregate ¶
func (_q *ChatBanQuery) Aggregate(fns ...AggregateFunc) *ChatBanSelect
Aggregate returns a ChatBanSelect configured with the given aggregations.
func (*ChatBanQuery) All ¶
func (_q *ChatBanQuery) All(ctx context.Context) ([]*ChatBan, error)
All executes the query and returns a list of ChatBans.
func (*ChatBanQuery) AllX ¶
func (_q *ChatBanQuery) AllX(ctx context.Context) []*ChatBan
AllX is like All, but panics if an error occurs.
func (*ChatBanQuery) Clone ¶
func (_q *ChatBanQuery) Clone() *ChatBanQuery
Clone returns a duplicate of the ChatBanQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatBanQuery) Count ¶
func (_q *ChatBanQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChatBanQuery) CountX ¶
func (_q *ChatBanQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChatBanQuery) Exist ¶
func (_q *ChatBanQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChatBanQuery) ExistX ¶
func (_q *ChatBanQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChatBanQuery) First ¶
func (_q *ChatBanQuery) First(ctx context.Context) (*ChatBan, error)
First returns the first ChatBan entity from the query. Returns a *NotFoundError when no ChatBan was found.
func (*ChatBanQuery) FirstID ¶
func (_q *ChatBanQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ChatBan ID from the query. Returns a *NotFoundError when no ChatBan ID was found.
func (*ChatBanQuery) FirstIDX ¶
func (_q *ChatBanQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChatBanQuery) FirstX ¶
func (_q *ChatBanQuery) FirstX(ctx context.Context) *ChatBan
FirstX is like First, but panics if an error occurs.
func (*ChatBanQuery) GroupBy ¶
func (_q *ChatBanQuery) GroupBy(field string, fields ...string) *ChatBanGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
IPHash string `json:"ip_hash,omitempty"`
Count int `json:"count,omitempty"`
}
client.ChatBan.Query().
GroupBy(chatban.FieldIPHash).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ChatBanQuery) IDs ¶
func (_q *ChatBanQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ChatBan IDs.
func (*ChatBanQuery) IDsX ¶
func (_q *ChatBanQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChatBanQuery) Limit ¶
func (_q *ChatBanQuery) Limit(limit int) *ChatBanQuery
Limit the number of records to be returned by this query.
func (*ChatBanQuery) Offset ¶
func (_q *ChatBanQuery) Offset(offset int) *ChatBanQuery
Offset to start from.
func (*ChatBanQuery) Only ¶
func (_q *ChatBanQuery) Only(ctx context.Context) (*ChatBan, error)
Only returns a single ChatBan entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChatBan entity is found. Returns a *NotFoundError when no ChatBan entities are found.
func (*ChatBanQuery) OnlyID ¶
func (_q *ChatBanQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ChatBan ID in the query. Returns a *NotSingularError when more than one ChatBan ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatBanQuery) OnlyIDX ¶
func (_q *ChatBanQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChatBanQuery) OnlyX ¶
func (_q *ChatBanQuery) OnlyX(ctx context.Context) *ChatBan
OnlyX is like Only, but panics if an error occurs.
func (*ChatBanQuery) Order ¶
func (_q *ChatBanQuery) Order(o ...chatban.OrderOption) *ChatBanQuery
Order specifies how the records should be ordered.
func (*ChatBanQuery) QueryBannedByUser ¶
func (_q *ChatBanQuery) QueryBannedByUser() *UserQuery
QueryBannedByUser chains the current query on the "banned_by_user" edge.
func (*ChatBanQuery) QueryRoom ¶
func (_q *ChatBanQuery) QueryRoom() *ChatRoomQuery
QueryRoom chains the current query on the "room" edge.
func (*ChatBanQuery) QueryUser ¶
func (_q *ChatBanQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ChatBanQuery) Select ¶
func (_q *ChatBanQuery) Select(fields ...string) *ChatBanSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
IPHash string `json:"ip_hash,omitempty"`
}
client.ChatBan.Query().
Select(chatban.FieldIPHash).
Scan(ctx, &v)
func (*ChatBanQuery) Unique ¶
func (_q *ChatBanQuery) Unique(unique bool) *ChatBanQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ChatBanQuery) Where ¶
func (_q *ChatBanQuery) Where(ps ...predicate.ChatBan) *ChatBanQuery
Where adds a new predicate for the ChatBanQuery builder.
func (*ChatBanQuery) WithBannedByUser ¶
func (_q *ChatBanQuery) WithBannedByUser(opts ...func(*UserQuery)) *ChatBanQuery
WithBannedByUser tells the query-builder to eager-load the nodes that are connected to the "banned_by_user" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatBanQuery) WithRoom ¶
func (_q *ChatBanQuery) WithRoom(opts ...func(*ChatRoomQuery)) *ChatBanQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatBanQuery) WithUser ¶
func (_q *ChatBanQuery) WithUser(opts ...func(*UserQuery)) *ChatBanQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ChatBanSelect ¶
type ChatBanSelect struct {
*ChatBanQuery
// contains filtered or unexported fields
}
ChatBanSelect is the builder for selecting fields of ChatBan entities.
func (*ChatBanSelect) Aggregate ¶
func (_s *ChatBanSelect) Aggregate(fns ...AggregateFunc) *ChatBanSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatBanSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatBanSelect) Scan ¶
func (_s *ChatBanSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatBanSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatBanUpdate ¶
type ChatBanUpdate struct {
// contains filtered or unexported fields
}
ChatBanUpdate is the builder for updating ChatBan entities.
func (*ChatBanUpdate) ClearBannedByUser ¶
func (_u *ChatBanUpdate) ClearBannedByUser() *ChatBanUpdate
ClearBannedByUser clears the "banned_by_user" edge to the User entity.
func (*ChatBanUpdate) ClearIPHash ¶
func (_u *ChatBanUpdate) ClearIPHash() *ChatBanUpdate
ClearIPHash clears the value of the "ip_hash" field.
func (*ChatBanUpdate) ClearReason ¶
func (_u *ChatBanUpdate) ClearReason() *ChatBanUpdate
ClearReason clears the value of the "reason" field.
func (*ChatBanUpdate) ClearRoom ¶
func (_u *ChatBanUpdate) ClearRoom() *ChatBanUpdate
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatBanUpdate) ClearUser ¶
func (_u *ChatBanUpdate) ClearUser() *ChatBanUpdate
ClearUser clears the "user" edge to the User entity.
func (*ChatBanUpdate) Exec ¶
func (_u *ChatBanUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatBanUpdate) ExecX ¶
func (_u *ChatBanUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatBanUpdate) Mutation ¶
func (_u *ChatBanUpdate) Mutation() *ChatBanMutation
Mutation returns the ChatBanMutation object of the builder.
func (*ChatBanUpdate) Save ¶
func (_u *ChatBanUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatBanUpdate) SaveX ¶
func (_u *ChatBanUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatBanUpdate) SetBannedByUser ¶
func (_u *ChatBanUpdate) SetBannedByUser(v *User) *ChatBanUpdate
SetBannedByUser sets the "banned_by_user" edge to the User entity.
func (*ChatBanUpdate) SetBannedByUserID ¶
func (_u *ChatBanUpdate) SetBannedByUserID(id int) *ChatBanUpdate
SetBannedByUserID sets the "banned_by_user" edge to the User entity by ID.
func (*ChatBanUpdate) SetIPHash ¶
func (_u *ChatBanUpdate) SetIPHash(v string) *ChatBanUpdate
SetIPHash sets the "ip_hash" field.
func (*ChatBanUpdate) SetNillableIPHash ¶
func (_u *ChatBanUpdate) SetNillableIPHash(v *string) *ChatBanUpdate
SetNillableIPHash sets the "ip_hash" field if the given value is not nil.
func (*ChatBanUpdate) SetNillableReason ¶
func (_u *ChatBanUpdate) SetNillableReason(v *string) *ChatBanUpdate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*ChatBanUpdate) SetNillableUserID ¶
func (_u *ChatBanUpdate) SetNillableUserID(id *int) *ChatBanUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ChatBanUpdate) SetReason ¶
func (_u *ChatBanUpdate) SetReason(v string) *ChatBanUpdate
SetReason sets the "reason" field.
func (*ChatBanUpdate) SetRoom ¶
func (_u *ChatBanUpdate) SetRoom(v *ChatRoom) *ChatBanUpdate
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatBanUpdate) SetRoomID ¶
func (_u *ChatBanUpdate) SetRoomID(id int) *ChatBanUpdate
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatBanUpdate) SetUser ¶
func (_u *ChatBanUpdate) SetUser(v *User) *ChatBanUpdate
SetUser sets the "user" edge to the User entity.
func (*ChatBanUpdate) SetUserID ¶
func (_u *ChatBanUpdate) SetUserID(id int) *ChatBanUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*ChatBanUpdate) Where ¶
func (_u *ChatBanUpdate) Where(ps ...predicate.ChatBan) *ChatBanUpdate
Where appends a list predicates to the ChatBanUpdate builder.
type ChatBanUpdateOne ¶
type ChatBanUpdateOne struct {
// contains filtered or unexported fields
}
ChatBanUpdateOne is the builder for updating a single ChatBan entity.
func (*ChatBanUpdateOne) ClearBannedByUser ¶
func (_u *ChatBanUpdateOne) ClearBannedByUser() *ChatBanUpdateOne
ClearBannedByUser clears the "banned_by_user" edge to the User entity.
func (*ChatBanUpdateOne) ClearIPHash ¶
func (_u *ChatBanUpdateOne) ClearIPHash() *ChatBanUpdateOne
ClearIPHash clears the value of the "ip_hash" field.
func (*ChatBanUpdateOne) ClearReason ¶
func (_u *ChatBanUpdateOne) ClearReason() *ChatBanUpdateOne
ClearReason clears the value of the "reason" field.
func (*ChatBanUpdateOne) ClearRoom ¶
func (_u *ChatBanUpdateOne) ClearRoom() *ChatBanUpdateOne
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatBanUpdateOne) ClearUser ¶
func (_u *ChatBanUpdateOne) ClearUser() *ChatBanUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ChatBanUpdateOne) Exec ¶
func (_u *ChatBanUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatBanUpdateOne) ExecX ¶
func (_u *ChatBanUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatBanUpdateOne) Mutation ¶
func (_u *ChatBanUpdateOne) Mutation() *ChatBanMutation
Mutation returns the ChatBanMutation object of the builder.
func (*ChatBanUpdateOne) Save ¶
func (_u *ChatBanUpdateOne) Save(ctx context.Context) (*ChatBan, error)
Save executes the query and returns the updated ChatBan entity.
func (*ChatBanUpdateOne) SaveX ¶
func (_u *ChatBanUpdateOne) SaveX(ctx context.Context) *ChatBan
SaveX is like Save, but panics if an error occurs.
func (*ChatBanUpdateOne) Select ¶
func (_u *ChatBanUpdateOne) Select(field string, fields ...string) *ChatBanUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatBanUpdateOne) SetBannedByUser ¶
func (_u *ChatBanUpdateOne) SetBannedByUser(v *User) *ChatBanUpdateOne
SetBannedByUser sets the "banned_by_user" edge to the User entity.
func (*ChatBanUpdateOne) SetBannedByUserID ¶
func (_u *ChatBanUpdateOne) SetBannedByUserID(id int) *ChatBanUpdateOne
SetBannedByUserID sets the "banned_by_user" edge to the User entity by ID.
func (*ChatBanUpdateOne) SetIPHash ¶
func (_u *ChatBanUpdateOne) SetIPHash(v string) *ChatBanUpdateOne
SetIPHash sets the "ip_hash" field.
func (*ChatBanUpdateOne) SetNillableIPHash ¶
func (_u *ChatBanUpdateOne) SetNillableIPHash(v *string) *ChatBanUpdateOne
SetNillableIPHash sets the "ip_hash" field if the given value is not nil.
func (*ChatBanUpdateOne) SetNillableReason ¶
func (_u *ChatBanUpdateOne) SetNillableReason(v *string) *ChatBanUpdateOne
SetNillableReason sets the "reason" field if the given value is not nil.
func (*ChatBanUpdateOne) SetNillableUserID ¶
func (_u *ChatBanUpdateOne) SetNillableUserID(id *int) *ChatBanUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ChatBanUpdateOne) SetReason ¶
func (_u *ChatBanUpdateOne) SetReason(v string) *ChatBanUpdateOne
SetReason sets the "reason" field.
func (*ChatBanUpdateOne) SetRoom ¶
func (_u *ChatBanUpdateOne) SetRoom(v *ChatRoom) *ChatBanUpdateOne
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatBanUpdateOne) SetRoomID ¶
func (_u *ChatBanUpdateOne) SetRoomID(id int) *ChatBanUpdateOne
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatBanUpdateOne) SetUser ¶
func (_u *ChatBanUpdateOne) SetUser(v *User) *ChatBanUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ChatBanUpdateOne) SetUserID ¶
func (_u *ChatBanUpdateOne) SetUserID(id int) *ChatBanUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*ChatBanUpdateOne) Where ¶
func (_u *ChatBanUpdateOne) Where(ps ...predicate.ChatBan) *ChatBanUpdateOne
Where appends a list predicates to the ChatBanUpdate builder.
type ChatMessage ¶
type ChatMessage struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Body holds the value of the "body" field.
Body string `json:"body,omitempty"`
// SenderName holds the value of the "sender_name" field.
SenderName string `json:"sender_name,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ChatMessageQuery when eager-loading is set.
Edges ChatMessageEdges `json:"edges"`
// contains filtered or unexported fields
}
ChatMessage is the model entity for the ChatMessage schema.
func (*ChatMessage) QueryRoom ¶
func (_m *ChatMessage) QueryRoom() *ChatRoomQuery
QueryRoom queries the "room" edge of the ChatMessage entity.
func (*ChatMessage) QuerySender ¶
func (_m *ChatMessage) QuerySender() *UserQuery
QuerySender queries the "sender" edge of the ChatMessage entity.
func (*ChatMessage) String ¶
func (_m *ChatMessage) String() string
String implements the fmt.Stringer.
func (*ChatMessage) Unwrap ¶
func (_m *ChatMessage) Unwrap() *ChatMessage
Unwrap unwraps the ChatMessage entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*ChatMessage) Update ¶
func (_m *ChatMessage) Update() *ChatMessageUpdateOne
Update returns a builder for updating this ChatMessage. Note that you need to call ChatMessage.Unwrap() before calling this method if this ChatMessage was returned from a transaction, and the transaction was committed or rolled back.
type ChatMessageClient ¶
type ChatMessageClient struct {
// contains filtered or unexported fields
}
ChatMessageClient is a client for the ChatMessage schema.
func NewChatMessageClient ¶
func NewChatMessageClient(c config) *ChatMessageClient
NewChatMessageClient returns a client for the ChatMessage from the given config.
func (*ChatMessageClient) Create ¶
func (c *ChatMessageClient) Create() *ChatMessageCreate
Create returns a builder for creating a ChatMessage entity.
func (*ChatMessageClient) CreateBulk ¶
func (c *ChatMessageClient) CreateBulk(builders ...*ChatMessageCreate) *ChatMessageCreateBulk
CreateBulk returns a builder for creating a bulk of ChatMessage entities.
func (*ChatMessageClient) Delete ¶
func (c *ChatMessageClient) Delete() *ChatMessageDelete
Delete returns a delete builder for ChatMessage.
func (*ChatMessageClient) DeleteOne ¶
func (c *ChatMessageClient) DeleteOne(_m *ChatMessage) *ChatMessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatMessageClient) DeleteOneID ¶
func (c *ChatMessageClient) DeleteOneID(id int) *ChatMessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatMessageClient) Get ¶
func (c *ChatMessageClient) Get(ctx context.Context, id int) (*ChatMessage, error)
Get returns a ChatMessage entity by its id.
func (*ChatMessageClient) GetX ¶
func (c *ChatMessageClient) GetX(ctx context.Context, id int) *ChatMessage
GetX is like Get, but panics if an error occurs.
func (*ChatMessageClient) Hooks ¶
func (c *ChatMessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChatMessageClient) Intercept ¶
func (c *ChatMessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chatmessage.Intercept(f(g(h())))`.
func (*ChatMessageClient) Interceptors ¶
func (c *ChatMessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatMessageClient) MapCreateBulk ¶
func (c *ChatMessageClient) MapCreateBulk(slice any, setFunc func(*ChatMessageCreate, int)) *ChatMessageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChatMessageClient) Query ¶
func (c *ChatMessageClient) Query() *ChatMessageQuery
Query returns a query builder for ChatMessage.
func (*ChatMessageClient) QueryRoom ¶
func (c *ChatMessageClient) QueryRoom(_m *ChatMessage) *ChatRoomQuery
QueryRoom queries the room edge of a ChatMessage.
func (*ChatMessageClient) QuerySender ¶
func (c *ChatMessageClient) QuerySender(_m *ChatMessage) *UserQuery
QuerySender queries the sender edge of a ChatMessage.
func (*ChatMessageClient) Update ¶
func (c *ChatMessageClient) Update() *ChatMessageUpdate
Update returns an update builder for ChatMessage.
func (*ChatMessageClient) UpdateOne ¶
func (c *ChatMessageClient) UpdateOne(_m *ChatMessage) *ChatMessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatMessageClient) UpdateOneID ¶
func (c *ChatMessageClient) UpdateOneID(id int) *ChatMessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatMessageClient) Use ¶
func (c *ChatMessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chatmessage.Hooks(f(g(h())))`.
type ChatMessageCreate ¶
type ChatMessageCreate struct {
// contains filtered or unexported fields
}
ChatMessageCreate is the builder for creating a ChatMessage entity.
func (*ChatMessageCreate) Exec ¶
func (_c *ChatMessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatMessageCreate) ExecX ¶
func (_c *ChatMessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageCreate) Mutation ¶
func (_c *ChatMessageCreate) Mutation() *ChatMessageMutation
Mutation returns the ChatMessageMutation object of the builder.
func (*ChatMessageCreate) Save ¶
func (_c *ChatMessageCreate) Save(ctx context.Context) (*ChatMessage, error)
Save creates the ChatMessage in the database.
func (*ChatMessageCreate) SaveX ¶
func (_c *ChatMessageCreate) SaveX(ctx context.Context) *ChatMessage
SaveX calls Save and panics if Save returns an error.
func (*ChatMessageCreate) SetBody ¶
func (_c *ChatMessageCreate) SetBody(v string) *ChatMessageCreate
SetBody sets the "body" field.
func (*ChatMessageCreate) SetCreatedAt ¶
func (_c *ChatMessageCreate) SetCreatedAt(v time.Time) *ChatMessageCreate
SetCreatedAt sets the "created_at" field.
func (*ChatMessageCreate) SetNillableCreatedAt ¶
func (_c *ChatMessageCreate) SetNillableCreatedAt(v *time.Time) *ChatMessageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatMessageCreate) SetNillableSenderID ¶
func (_c *ChatMessageCreate) SetNillableSenderID(id *int) *ChatMessageCreate
SetNillableSenderID sets the "sender" edge to the User entity by ID if the given value is not nil.
func (*ChatMessageCreate) SetRoom ¶
func (_c *ChatMessageCreate) SetRoom(v *ChatRoom) *ChatMessageCreate
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatMessageCreate) SetRoomID ¶
func (_c *ChatMessageCreate) SetRoomID(id int) *ChatMessageCreate
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatMessageCreate) SetSender ¶
func (_c *ChatMessageCreate) SetSender(v *User) *ChatMessageCreate
SetSender sets the "sender" edge to the User entity.
func (*ChatMessageCreate) SetSenderID ¶
func (_c *ChatMessageCreate) SetSenderID(id int) *ChatMessageCreate
SetSenderID sets the "sender" edge to the User entity by ID.
func (*ChatMessageCreate) SetSenderName ¶
func (_c *ChatMessageCreate) SetSenderName(v string) *ChatMessageCreate
SetSenderName sets the "sender_name" field.
type ChatMessageCreateBulk ¶
type ChatMessageCreateBulk struct {
// contains filtered or unexported fields
}
ChatMessageCreateBulk is the builder for creating many ChatMessage entities in bulk.
func (*ChatMessageCreateBulk) Exec ¶
func (_c *ChatMessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatMessageCreateBulk) ExecX ¶
func (_c *ChatMessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageCreateBulk) Save ¶
func (_c *ChatMessageCreateBulk) Save(ctx context.Context) ([]*ChatMessage, error)
Save creates the ChatMessage entities in the database.
func (*ChatMessageCreateBulk) SaveX ¶
func (_c *ChatMessageCreateBulk) SaveX(ctx context.Context) []*ChatMessage
SaveX is like Save, but panics if an error occurs.
type ChatMessageDelete ¶
type ChatMessageDelete struct {
// contains filtered or unexported fields
}
ChatMessageDelete is the builder for deleting a ChatMessage entity.
func (*ChatMessageDelete) Exec ¶
func (_d *ChatMessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatMessageDelete) ExecX ¶
func (_d *ChatMessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageDelete) Where ¶
func (_d *ChatMessageDelete) Where(ps ...predicate.ChatMessage) *ChatMessageDelete
Where appends a list predicates to the ChatMessageDelete builder.
type ChatMessageDeleteOne ¶
type ChatMessageDeleteOne struct {
// contains filtered or unexported fields
}
ChatMessageDeleteOne is the builder for deleting a single ChatMessage entity.
func (*ChatMessageDeleteOne) Exec ¶
func (_d *ChatMessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatMessageDeleteOne) ExecX ¶
func (_d *ChatMessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageDeleteOne) Where ¶
func (_d *ChatMessageDeleteOne) Where(ps ...predicate.ChatMessage) *ChatMessageDeleteOne
Where appends a list predicates to the ChatMessageDelete builder.
type ChatMessageEdges ¶
type ChatMessageEdges struct {
// Room holds the value of the room edge.
Room *ChatRoom `json:"room,omitempty"`
// Sender holds the value of the sender edge.
Sender *User `json:"sender,omitempty"`
// contains filtered or unexported fields
}
ChatMessageEdges holds the relations/edges for other nodes in the graph.
func (ChatMessageEdges) RoomOrErr ¶
func (e ChatMessageEdges) RoomOrErr() (*ChatRoom, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ChatMessageEdges) SenderOrErr ¶
func (e ChatMessageEdges) SenderOrErr() (*User, error)
SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ChatMessageGroupBy ¶
type ChatMessageGroupBy struct {
// contains filtered or unexported fields
}
ChatMessageGroupBy is the group-by builder for ChatMessage entities.
func (*ChatMessageGroupBy) Aggregate ¶
func (_g *ChatMessageGroupBy) Aggregate(fns ...AggregateFunc) *ChatMessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatMessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatMessageGroupBy) Scan ¶
func (_g *ChatMessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatMessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatMessageMutation ¶
type ChatMessageMutation struct {
// contains filtered or unexported fields
}
ChatMessageMutation represents an operation that mutates the ChatMessage nodes in the graph.
func (*ChatMessageMutation) AddField ¶
func (m *ChatMessageMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatMessageMutation) AddedEdges ¶
func (m *ChatMessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatMessageMutation) AddedField ¶
func (m *ChatMessageMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatMessageMutation) AddedFields ¶
func (m *ChatMessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatMessageMutation) AddedIDs ¶
func (m *ChatMessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatMessageMutation) Body ¶
func (m *ChatMessageMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*ChatMessageMutation) ClearEdge ¶
func (m *ChatMessageMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ChatMessageMutation) ClearField ¶
func (m *ChatMessageMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatMessageMutation) ClearRoom ¶
func (m *ChatMessageMutation) ClearRoom()
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatMessageMutation) ClearSender ¶
func (m *ChatMessageMutation) ClearSender()
ClearSender clears the "sender" edge to the User entity.
func (*ChatMessageMutation) ClearedEdges ¶
func (m *ChatMessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatMessageMutation) ClearedFields ¶
func (m *ChatMessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatMessageMutation) Client ¶
func (m ChatMessageMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ChatMessageMutation) CreatedAt ¶
func (m *ChatMessageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChatMessageMutation) EdgeCleared ¶
func (m *ChatMessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatMessageMutation) Field ¶
func (m *ChatMessageMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatMessageMutation) FieldCleared ¶
func (m *ChatMessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatMessageMutation) Fields ¶
func (m *ChatMessageMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ChatMessageMutation) ID ¶
func (m *ChatMessageMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ChatMessageMutation) IDs ¶
func (m *ChatMessageMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ChatMessageMutation) OldBody ¶
func (m *ChatMessageMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" field's value of the ChatMessage entity. If the ChatMessage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatMessageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ChatMessage entity. If the ChatMessage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatMessageMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ChatMessageMutation) OldSenderName ¶
func (m *ChatMessageMutation) OldSenderName(ctx context.Context) (v string, err error)
OldSenderName returns the old "sender_name" field's value of the ChatMessage entity. If the ChatMessage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatMessageMutation) Op ¶
func (m *ChatMessageMutation) Op() Op
Op returns the operation name.
func (*ChatMessageMutation) RemovedEdges ¶
func (m *ChatMessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatMessageMutation) RemovedIDs ¶
func (m *ChatMessageMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ChatMessageMutation) ResetBody ¶
func (m *ChatMessageMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*ChatMessageMutation) ResetCreatedAt ¶
func (m *ChatMessageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChatMessageMutation) ResetEdge ¶
func (m *ChatMessageMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ChatMessageMutation) ResetField ¶
func (m *ChatMessageMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatMessageMutation) ResetRoom ¶
func (m *ChatMessageMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*ChatMessageMutation) ResetSender ¶
func (m *ChatMessageMutation) ResetSender()
ResetSender resets all changes to the "sender" edge.
func (*ChatMessageMutation) ResetSenderName ¶
func (m *ChatMessageMutation) ResetSenderName()
ResetSenderName resets all changes to the "sender_name" field.
func (*ChatMessageMutation) RoomCleared ¶
func (m *ChatMessageMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the ChatRoom entity was cleared.
func (*ChatMessageMutation) RoomID ¶
func (m *ChatMessageMutation) RoomID() (id int, exists bool)
RoomID returns the "room" edge ID in the mutation.
func (*ChatMessageMutation) RoomIDs ¶
func (m *ChatMessageMutation) RoomIDs() (ids []int)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*ChatMessageMutation) SenderCleared ¶
func (m *ChatMessageMutation) SenderCleared() bool
SenderCleared reports if the "sender" edge to the User entity was cleared.
func (*ChatMessageMutation) SenderID ¶
func (m *ChatMessageMutation) SenderID() (id int, exists bool)
SenderID returns the "sender" edge ID in the mutation.
func (*ChatMessageMutation) SenderIDs ¶
func (m *ChatMessageMutation) SenderIDs() (ids []int)
SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.
func (*ChatMessageMutation) SenderName ¶
func (m *ChatMessageMutation) SenderName() (r string, exists bool)
SenderName returns the value of the "sender_name" field in the mutation.
func (*ChatMessageMutation) SetBody ¶
func (m *ChatMessageMutation) SetBody(s string)
SetBody sets the "body" field.
func (*ChatMessageMutation) SetCreatedAt ¶
func (m *ChatMessageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChatMessageMutation) SetField ¶
func (m *ChatMessageMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatMessageMutation) SetOp ¶
func (m *ChatMessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatMessageMutation) SetRoomID ¶
func (m *ChatMessageMutation) SetRoomID(id int)
SetRoomID sets the "room" edge to the ChatRoom entity by id.
func (*ChatMessageMutation) SetSenderID ¶
func (m *ChatMessageMutation) SetSenderID(id int)
SetSenderID sets the "sender" edge to the User entity by id.
func (*ChatMessageMutation) SetSenderName ¶
func (m *ChatMessageMutation) SetSenderName(s string)
SetSenderName sets the "sender_name" field.
func (ChatMessageMutation) Tx ¶
func (m ChatMessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatMessageMutation) Type ¶
func (m *ChatMessageMutation) Type() string
Type returns the node type of this mutation (ChatMessage).
func (*ChatMessageMutation) Where ¶
func (m *ChatMessageMutation) Where(ps ...predicate.ChatMessage)
Where appends a list predicates to the ChatMessageMutation builder.
func (*ChatMessageMutation) WhereP ¶
func (m *ChatMessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatMessageQuery ¶
type ChatMessageQuery struct {
// contains filtered or unexported fields
}
ChatMessageQuery is the builder for querying ChatMessage entities.
func (*ChatMessageQuery) Aggregate ¶
func (_q *ChatMessageQuery) Aggregate(fns ...AggregateFunc) *ChatMessageSelect
Aggregate returns a ChatMessageSelect configured with the given aggregations.
func (*ChatMessageQuery) All ¶
func (_q *ChatMessageQuery) All(ctx context.Context) ([]*ChatMessage, error)
All executes the query and returns a list of ChatMessages.
func (*ChatMessageQuery) AllX ¶
func (_q *ChatMessageQuery) AllX(ctx context.Context) []*ChatMessage
AllX is like All, but panics if an error occurs.
func (*ChatMessageQuery) Clone ¶
func (_q *ChatMessageQuery) Clone() *ChatMessageQuery
Clone returns a duplicate of the ChatMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatMessageQuery) Count ¶
func (_q *ChatMessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChatMessageQuery) CountX ¶
func (_q *ChatMessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChatMessageQuery) Exist ¶
func (_q *ChatMessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChatMessageQuery) ExistX ¶
func (_q *ChatMessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChatMessageQuery) First ¶
func (_q *ChatMessageQuery) First(ctx context.Context) (*ChatMessage, error)
First returns the first ChatMessage entity from the query. Returns a *NotFoundError when no ChatMessage was found.
func (*ChatMessageQuery) FirstID ¶
func (_q *ChatMessageQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ChatMessage ID from the query. Returns a *NotFoundError when no ChatMessage ID was found.
func (*ChatMessageQuery) FirstIDX ¶
func (_q *ChatMessageQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChatMessageQuery) FirstX ¶
func (_q *ChatMessageQuery) FirstX(ctx context.Context) *ChatMessage
FirstX is like First, but panics if an error occurs.
func (*ChatMessageQuery) GroupBy ¶
func (_q *ChatMessageQuery) GroupBy(field string, fields ...string) *ChatMessageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Body string `json:"body,omitempty"`
Count int `json:"count,omitempty"`
}
client.ChatMessage.Query().
GroupBy(chatmessage.FieldBody).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ChatMessageQuery) IDs ¶
func (_q *ChatMessageQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ChatMessage IDs.
func (*ChatMessageQuery) IDsX ¶
func (_q *ChatMessageQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChatMessageQuery) Limit ¶
func (_q *ChatMessageQuery) Limit(limit int) *ChatMessageQuery
Limit the number of records to be returned by this query.
func (*ChatMessageQuery) Offset ¶
func (_q *ChatMessageQuery) Offset(offset int) *ChatMessageQuery
Offset to start from.
func (*ChatMessageQuery) Only ¶
func (_q *ChatMessageQuery) Only(ctx context.Context) (*ChatMessage, error)
Only returns a single ChatMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChatMessage entity is found. Returns a *NotFoundError when no ChatMessage entities are found.
func (*ChatMessageQuery) OnlyID ¶
func (_q *ChatMessageQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ChatMessage ID in the query. Returns a *NotSingularError when more than one ChatMessage ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatMessageQuery) OnlyIDX ¶
func (_q *ChatMessageQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChatMessageQuery) OnlyX ¶
func (_q *ChatMessageQuery) OnlyX(ctx context.Context) *ChatMessage
OnlyX is like Only, but panics if an error occurs.
func (*ChatMessageQuery) Order ¶
func (_q *ChatMessageQuery) Order(o ...chatmessage.OrderOption) *ChatMessageQuery
Order specifies how the records should be ordered.
func (*ChatMessageQuery) QueryRoom ¶
func (_q *ChatMessageQuery) QueryRoom() *ChatRoomQuery
QueryRoom chains the current query on the "room" edge.
func (*ChatMessageQuery) QuerySender ¶
func (_q *ChatMessageQuery) QuerySender() *UserQuery
QuerySender chains the current query on the "sender" edge.
func (*ChatMessageQuery) Select ¶
func (_q *ChatMessageQuery) Select(fields ...string) *ChatMessageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Body string `json:"body,omitempty"`
}
client.ChatMessage.Query().
Select(chatmessage.FieldBody).
Scan(ctx, &v)
func (*ChatMessageQuery) Unique ¶
func (_q *ChatMessageQuery) Unique(unique bool) *ChatMessageQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ChatMessageQuery) Where ¶
func (_q *ChatMessageQuery) Where(ps ...predicate.ChatMessage) *ChatMessageQuery
Where adds a new predicate for the ChatMessageQuery builder.
func (*ChatMessageQuery) WithRoom ¶
func (_q *ChatMessageQuery) WithRoom(opts ...func(*ChatRoomQuery)) *ChatMessageQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatMessageQuery) WithSender ¶
func (_q *ChatMessageQuery) WithSender(opts ...func(*UserQuery)) *ChatMessageQuery
WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.
type ChatMessageSelect ¶
type ChatMessageSelect struct {
*ChatMessageQuery
// contains filtered or unexported fields
}
ChatMessageSelect is the builder for selecting fields of ChatMessage entities.
func (*ChatMessageSelect) Aggregate ¶
func (_s *ChatMessageSelect) Aggregate(fns ...AggregateFunc) *ChatMessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatMessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatMessageSelect) Scan ¶
func (_s *ChatMessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatMessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatMessageUpdate ¶
type ChatMessageUpdate struct {
// contains filtered or unexported fields
}
ChatMessageUpdate is the builder for updating ChatMessage entities.
func (*ChatMessageUpdate) ClearRoom ¶
func (_u *ChatMessageUpdate) ClearRoom() *ChatMessageUpdate
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatMessageUpdate) ClearSender ¶
func (_u *ChatMessageUpdate) ClearSender() *ChatMessageUpdate
ClearSender clears the "sender" edge to the User entity.
func (*ChatMessageUpdate) Exec ¶
func (_u *ChatMessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatMessageUpdate) ExecX ¶
func (_u *ChatMessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageUpdate) Mutation ¶
func (_u *ChatMessageUpdate) Mutation() *ChatMessageMutation
Mutation returns the ChatMessageMutation object of the builder.
func (*ChatMessageUpdate) Save ¶
func (_u *ChatMessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatMessageUpdate) SaveX ¶
func (_u *ChatMessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatMessageUpdate) SetBody ¶
func (_u *ChatMessageUpdate) SetBody(v string) *ChatMessageUpdate
SetBody sets the "body" field.
func (*ChatMessageUpdate) SetNillableBody ¶
func (_u *ChatMessageUpdate) SetNillableBody(v *string) *ChatMessageUpdate
SetNillableBody sets the "body" field if the given value is not nil.
func (*ChatMessageUpdate) SetNillableSenderID ¶
func (_u *ChatMessageUpdate) SetNillableSenderID(id *int) *ChatMessageUpdate
SetNillableSenderID sets the "sender" edge to the User entity by ID if the given value is not nil.
func (*ChatMessageUpdate) SetNillableSenderName ¶
func (_u *ChatMessageUpdate) SetNillableSenderName(v *string) *ChatMessageUpdate
SetNillableSenderName sets the "sender_name" field if the given value is not nil.
func (*ChatMessageUpdate) SetRoom ¶
func (_u *ChatMessageUpdate) SetRoom(v *ChatRoom) *ChatMessageUpdate
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatMessageUpdate) SetRoomID ¶
func (_u *ChatMessageUpdate) SetRoomID(id int) *ChatMessageUpdate
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatMessageUpdate) SetSender ¶
func (_u *ChatMessageUpdate) SetSender(v *User) *ChatMessageUpdate
SetSender sets the "sender" edge to the User entity.
func (*ChatMessageUpdate) SetSenderID ¶
func (_u *ChatMessageUpdate) SetSenderID(id int) *ChatMessageUpdate
SetSenderID sets the "sender" edge to the User entity by ID.
func (*ChatMessageUpdate) SetSenderName ¶
func (_u *ChatMessageUpdate) SetSenderName(v string) *ChatMessageUpdate
SetSenderName sets the "sender_name" field.
func (*ChatMessageUpdate) Where ¶
func (_u *ChatMessageUpdate) Where(ps ...predicate.ChatMessage) *ChatMessageUpdate
Where appends a list predicates to the ChatMessageUpdate builder.
type ChatMessageUpdateOne ¶
type ChatMessageUpdateOne struct {
// contains filtered or unexported fields
}
ChatMessageUpdateOne is the builder for updating a single ChatMessage entity.
func (*ChatMessageUpdateOne) ClearRoom ¶
func (_u *ChatMessageUpdateOne) ClearRoom() *ChatMessageUpdateOne
ClearRoom clears the "room" edge to the ChatRoom entity.
func (*ChatMessageUpdateOne) ClearSender ¶
func (_u *ChatMessageUpdateOne) ClearSender() *ChatMessageUpdateOne
ClearSender clears the "sender" edge to the User entity.
func (*ChatMessageUpdateOne) Exec ¶
func (_u *ChatMessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatMessageUpdateOne) ExecX ¶
func (_u *ChatMessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatMessageUpdateOne) Mutation ¶
func (_u *ChatMessageUpdateOne) Mutation() *ChatMessageMutation
Mutation returns the ChatMessageMutation object of the builder.
func (*ChatMessageUpdateOne) Save ¶
func (_u *ChatMessageUpdateOne) Save(ctx context.Context) (*ChatMessage, error)
Save executes the query and returns the updated ChatMessage entity.
func (*ChatMessageUpdateOne) SaveX ¶
func (_u *ChatMessageUpdateOne) SaveX(ctx context.Context) *ChatMessage
SaveX is like Save, but panics if an error occurs.
func (*ChatMessageUpdateOne) Select ¶
func (_u *ChatMessageUpdateOne) Select(field string, fields ...string) *ChatMessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatMessageUpdateOne) SetBody ¶
func (_u *ChatMessageUpdateOne) SetBody(v string) *ChatMessageUpdateOne
SetBody sets the "body" field.
func (*ChatMessageUpdateOne) SetNillableBody ¶
func (_u *ChatMessageUpdateOne) SetNillableBody(v *string) *ChatMessageUpdateOne
SetNillableBody sets the "body" field if the given value is not nil.
func (*ChatMessageUpdateOne) SetNillableSenderID ¶
func (_u *ChatMessageUpdateOne) SetNillableSenderID(id *int) *ChatMessageUpdateOne
SetNillableSenderID sets the "sender" edge to the User entity by ID if the given value is not nil.
func (*ChatMessageUpdateOne) SetNillableSenderName ¶
func (_u *ChatMessageUpdateOne) SetNillableSenderName(v *string) *ChatMessageUpdateOne
SetNillableSenderName sets the "sender_name" field if the given value is not nil.
func (*ChatMessageUpdateOne) SetRoom ¶
func (_u *ChatMessageUpdateOne) SetRoom(v *ChatRoom) *ChatMessageUpdateOne
SetRoom sets the "room" edge to the ChatRoom entity.
func (*ChatMessageUpdateOne) SetRoomID ¶
func (_u *ChatMessageUpdateOne) SetRoomID(id int) *ChatMessageUpdateOne
SetRoomID sets the "room" edge to the ChatRoom entity by ID.
func (*ChatMessageUpdateOne) SetSender ¶
func (_u *ChatMessageUpdateOne) SetSender(v *User) *ChatMessageUpdateOne
SetSender sets the "sender" edge to the User entity.
func (*ChatMessageUpdateOne) SetSenderID ¶
func (_u *ChatMessageUpdateOne) SetSenderID(id int) *ChatMessageUpdateOne
SetSenderID sets the "sender" edge to the User entity by ID.
func (*ChatMessageUpdateOne) SetSenderName ¶
func (_u *ChatMessageUpdateOne) SetSenderName(v string) *ChatMessageUpdateOne
SetSenderName sets the "sender_name" field.
func (*ChatMessageUpdateOne) Where ¶
func (_u *ChatMessageUpdateOne) Where(ps ...predicate.ChatMessage) *ChatMessageUpdateOne
Where appends a list predicates to the ChatMessageUpdate builder.
type ChatMessages ¶
type ChatMessages []*ChatMessage
ChatMessages is a parsable slice of ChatMessage.
type ChatRoom ¶
type ChatRoom struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// IsPublic holds the value of the "is_public" field.
IsPublic bool `json:"is_public,omitempty"`
// PasswordHash holds the value of the "password_hash" field.
PasswordHash string `json:"-"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ChatRoomQuery when eager-loading is set.
Edges ChatRoomEdges `json:"edges"`
// contains filtered or unexported fields
}
ChatRoom is the model entity for the ChatRoom schema.
func (*ChatRoom) QueryBans ¶
func (_m *ChatRoom) QueryBans() *ChatBanQuery
QueryBans queries the "bans" edge of the ChatRoom entity.
func (*ChatRoom) QueryMessages ¶
func (_m *ChatRoom) QueryMessages() *ChatMessageQuery
QueryMessages queries the "messages" edge of the ChatRoom entity.
func (*ChatRoom) QueryOwner ¶
QueryOwner queries the "owner" edge of the ChatRoom entity.
func (*ChatRoom) Unwrap ¶
Unwrap unwraps the ChatRoom entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*ChatRoom) Update ¶
func (_m *ChatRoom) Update() *ChatRoomUpdateOne
Update returns a builder for updating this ChatRoom. Note that you need to call ChatRoom.Unwrap() before calling this method if this ChatRoom was returned from a transaction, and the transaction was committed or rolled back.
type ChatRoomClient ¶
type ChatRoomClient struct {
// contains filtered or unexported fields
}
ChatRoomClient is a client for the ChatRoom schema.
func NewChatRoomClient ¶
func NewChatRoomClient(c config) *ChatRoomClient
NewChatRoomClient returns a client for the ChatRoom from the given config.
func (*ChatRoomClient) Create ¶
func (c *ChatRoomClient) Create() *ChatRoomCreate
Create returns a builder for creating a ChatRoom entity.
func (*ChatRoomClient) CreateBulk ¶
func (c *ChatRoomClient) CreateBulk(builders ...*ChatRoomCreate) *ChatRoomCreateBulk
CreateBulk returns a builder for creating a bulk of ChatRoom entities.
func (*ChatRoomClient) Delete ¶
func (c *ChatRoomClient) Delete() *ChatRoomDelete
Delete returns a delete builder for ChatRoom.
func (*ChatRoomClient) DeleteOne ¶
func (c *ChatRoomClient) DeleteOne(_m *ChatRoom) *ChatRoomDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatRoomClient) DeleteOneID ¶
func (c *ChatRoomClient) DeleteOneID(id int) *ChatRoomDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatRoomClient) GetX ¶
func (c *ChatRoomClient) GetX(ctx context.Context, id int) *ChatRoom
GetX is like Get, but panics if an error occurs.
func (*ChatRoomClient) Hooks ¶
func (c *ChatRoomClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChatRoomClient) Intercept ¶
func (c *ChatRoomClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chatroom.Intercept(f(g(h())))`.
func (*ChatRoomClient) Interceptors ¶
func (c *ChatRoomClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatRoomClient) MapCreateBulk ¶
func (c *ChatRoomClient) MapCreateBulk(slice any, setFunc func(*ChatRoomCreate, int)) *ChatRoomCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChatRoomClient) Query ¶
func (c *ChatRoomClient) Query() *ChatRoomQuery
Query returns a query builder for ChatRoom.
func (*ChatRoomClient) QueryBans ¶
func (c *ChatRoomClient) QueryBans(_m *ChatRoom) *ChatBanQuery
QueryBans queries the bans edge of a ChatRoom.
func (*ChatRoomClient) QueryMessages ¶
func (c *ChatRoomClient) QueryMessages(_m *ChatRoom) *ChatMessageQuery
QueryMessages queries the messages edge of a ChatRoom.
func (*ChatRoomClient) QueryOwner ¶
func (c *ChatRoomClient) QueryOwner(_m *ChatRoom) *UserQuery
QueryOwner queries the owner edge of a ChatRoom.
func (*ChatRoomClient) Update ¶
func (c *ChatRoomClient) Update() *ChatRoomUpdate
Update returns an update builder for ChatRoom.
func (*ChatRoomClient) UpdateOne ¶
func (c *ChatRoomClient) UpdateOne(_m *ChatRoom) *ChatRoomUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatRoomClient) UpdateOneID ¶
func (c *ChatRoomClient) UpdateOneID(id int) *ChatRoomUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatRoomClient) Use ¶
func (c *ChatRoomClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chatroom.Hooks(f(g(h())))`.
type ChatRoomCreate ¶
type ChatRoomCreate struct {
// contains filtered or unexported fields
}
ChatRoomCreate is the builder for creating a ChatRoom entity.
func (*ChatRoomCreate) AddBanIDs ¶
func (_c *ChatRoomCreate) AddBanIDs(ids ...int) *ChatRoomCreate
AddBanIDs adds the "bans" edge to the ChatBan entity by IDs.
func (*ChatRoomCreate) AddBans ¶
func (_c *ChatRoomCreate) AddBans(v ...*ChatBan) *ChatRoomCreate
AddBans adds the "bans" edges to the ChatBan entity.
func (*ChatRoomCreate) AddMessageIDs ¶
func (_c *ChatRoomCreate) AddMessageIDs(ids ...int) *ChatRoomCreate
AddMessageIDs adds the "messages" edge to the ChatMessage entity by IDs.
func (*ChatRoomCreate) AddMessages ¶
func (_c *ChatRoomCreate) AddMessages(v ...*ChatMessage) *ChatRoomCreate
AddMessages adds the "messages" edges to the ChatMessage entity.
func (*ChatRoomCreate) Exec ¶
func (_c *ChatRoomCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatRoomCreate) ExecX ¶
func (_c *ChatRoomCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatRoomCreate) Mutation ¶
func (_c *ChatRoomCreate) Mutation() *ChatRoomMutation
Mutation returns the ChatRoomMutation object of the builder.
func (*ChatRoomCreate) Save ¶
func (_c *ChatRoomCreate) Save(ctx context.Context) (*ChatRoom, error)
Save creates the ChatRoom in the database.
func (*ChatRoomCreate) SaveX ¶
func (_c *ChatRoomCreate) SaveX(ctx context.Context) *ChatRoom
SaveX calls Save and panics if Save returns an error.
func (*ChatRoomCreate) SetCreatedAt ¶
func (_c *ChatRoomCreate) SetCreatedAt(v time.Time) *ChatRoomCreate
SetCreatedAt sets the "created_at" field.
func (*ChatRoomCreate) SetIsPublic ¶
func (_c *ChatRoomCreate) SetIsPublic(v bool) *ChatRoomCreate
SetIsPublic sets the "is_public" field.
func (*ChatRoomCreate) SetName ¶
func (_c *ChatRoomCreate) SetName(v string) *ChatRoomCreate
SetName sets the "name" field.
func (*ChatRoomCreate) SetNillableCreatedAt ¶
func (_c *ChatRoomCreate) SetNillableCreatedAt(v *time.Time) *ChatRoomCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatRoomCreate) SetNillableIsPublic ¶
func (_c *ChatRoomCreate) SetNillableIsPublic(v *bool) *ChatRoomCreate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*ChatRoomCreate) SetNillableOwnerID ¶
func (_c *ChatRoomCreate) SetNillableOwnerID(id *int) *ChatRoomCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*ChatRoomCreate) SetNillablePasswordHash ¶
func (_c *ChatRoomCreate) SetNillablePasswordHash(v *string) *ChatRoomCreate
SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.
func (*ChatRoomCreate) SetOwner ¶
func (_c *ChatRoomCreate) SetOwner(v *User) *ChatRoomCreate
SetOwner sets the "owner" edge to the User entity.
func (*ChatRoomCreate) SetOwnerID ¶
func (_c *ChatRoomCreate) SetOwnerID(id int) *ChatRoomCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ChatRoomCreate) SetPasswordHash ¶
func (_c *ChatRoomCreate) SetPasswordHash(v string) *ChatRoomCreate
SetPasswordHash sets the "password_hash" field.
type ChatRoomCreateBulk ¶
type ChatRoomCreateBulk struct {
// contains filtered or unexported fields
}
ChatRoomCreateBulk is the builder for creating many ChatRoom entities in bulk.
func (*ChatRoomCreateBulk) Exec ¶
func (_c *ChatRoomCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatRoomCreateBulk) ExecX ¶
func (_c *ChatRoomCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChatRoomDelete ¶
type ChatRoomDelete struct {
// contains filtered or unexported fields
}
ChatRoomDelete is the builder for deleting a ChatRoom entity.
func (*ChatRoomDelete) Exec ¶
func (_d *ChatRoomDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatRoomDelete) ExecX ¶
func (_d *ChatRoomDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatRoomDelete) Where ¶
func (_d *ChatRoomDelete) Where(ps ...predicate.ChatRoom) *ChatRoomDelete
Where appends a list predicates to the ChatRoomDelete builder.
type ChatRoomDeleteOne ¶
type ChatRoomDeleteOne struct {
// contains filtered or unexported fields
}
ChatRoomDeleteOne is the builder for deleting a single ChatRoom entity.
func (*ChatRoomDeleteOne) Exec ¶
func (_d *ChatRoomDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatRoomDeleteOne) ExecX ¶
func (_d *ChatRoomDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatRoomDeleteOne) Where ¶
func (_d *ChatRoomDeleteOne) Where(ps ...predicate.ChatRoom) *ChatRoomDeleteOne
Where appends a list predicates to the ChatRoomDelete builder.
type ChatRoomEdges ¶
type ChatRoomEdges struct {
// Owner holds the value of the owner edge.
Owner *User `json:"owner,omitempty"`
// Messages holds the value of the messages edge.
Messages []*ChatMessage `json:"messages,omitempty"`
// Bans holds the value of the bans edge.
Bans []*ChatBan `json:"bans,omitempty"`
// contains filtered or unexported fields
}
ChatRoomEdges holds the relations/edges for other nodes in the graph.
func (ChatRoomEdges) BansOrErr ¶
func (e ChatRoomEdges) BansOrErr() ([]*ChatBan, error)
BansOrErr returns the Bans value or an error if the edge was not loaded in eager-loading.
func (ChatRoomEdges) MessagesOrErr ¶
func (e ChatRoomEdges) MessagesOrErr() ([]*ChatMessage, error)
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
func (ChatRoomEdges) OwnerOrErr ¶
func (e ChatRoomEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ChatRoomGroupBy ¶
type ChatRoomGroupBy struct {
// contains filtered or unexported fields
}
ChatRoomGroupBy is the group-by builder for ChatRoom entities.
func (*ChatRoomGroupBy) Aggregate ¶
func (_g *ChatRoomGroupBy) Aggregate(fns ...AggregateFunc) *ChatRoomGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatRoomGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatRoomGroupBy) Scan ¶
func (_g *ChatRoomGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatRoomGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatRoomMutation ¶
type ChatRoomMutation struct {
// contains filtered or unexported fields
}
ChatRoomMutation represents an operation that mutates the ChatRoom nodes in the graph.
func (*ChatRoomMutation) AddBanIDs ¶
func (m *ChatRoomMutation) AddBanIDs(ids ...int)
AddBanIDs adds the "bans" edge to the ChatBan entity by ids.
func (*ChatRoomMutation) AddField ¶
func (m *ChatRoomMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatRoomMutation) AddMessageIDs ¶
func (m *ChatRoomMutation) AddMessageIDs(ids ...int)
AddMessageIDs adds the "messages" edge to the ChatMessage entity by ids.
func (*ChatRoomMutation) AddedEdges ¶
func (m *ChatRoomMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatRoomMutation) AddedField ¶
func (m *ChatRoomMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatRoomMutation) AddedFields ¶
func (m *ChatRoomMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatRoomMutation) AddedIDs ¶
func (m *ChatRoomMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatRoomMutation) BansCleared ¶
func (m *ChatRoomMutation) BansCleared() bool
BansCleared reports if the "bans" edge to the ChatBan entity was cleared.
func (*ChatRoomMutation) BansIDs ¶
func (m *ChatRoomMutation) BansIDs() (ids []int)
BansIDs returns the "bans" edge IDs in the mutation.
func (*ChatRoomMutation) ClearBans ¶
func (m *ChatRoomMutation) ClearBans()
ClearBans clears the "bans" edge to the ChatBan entity.
func (*ChatRoomMutation) ClearEdge ¶
func (m *ChatRoomMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ChatRoomMutation) ClearField ¶
func (m *ChatRoomMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatRoomMutation) ClearMessages ¶
func (m *ChatRoomMutation) ClearMessages()
ClearMessages clears the "messages" edge to the ChatMessage entity.
func (*ChatRoomMutation) ClearOwner ¶
func (m *ChatRoomMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*ChatRoomMutation) ClearPasswordHash ¶
func (m *ChatRoomMutation) ClearPasswordHash()
ClearPasswordHash clears the value of the "password_hash" field.
func (*ChatRoomMutation) ClearedEdges ¶
func (m *ChatRoomMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatRoomMutation) ClearedFields ¶
func (m *ChatRoomMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatRoomMutation) Client ¶
func (m ChatRoomMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ChatRoomMutation) CreatedAt ¶
func (m *ChatRoomMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChatRoomMutation) EdgeCleared ¶
func (m *ChatRoomMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatRoomMutation) Field ¶
func (m *ChatRoomMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ChatRoomMutation) FieldCleared ¶
func (m *ChatRoomMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatRoomMutation) Fields ¶
func (m *ChatRoomMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ChatRoomMutation) ID ¶
func (m *ChatRoomMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ChatRoomMutation) IDs ¶
func (m *ChatRoomMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ChatRoomMutation) IsPublic ¶
func (m *ChatRoomMutation) IsPublic() (r bool, exists bool)
IsPublic returns the value of the "is_public" field in the mutation.
func (*ChatRoomMutation) MessagesCleared ¶
func (m *ChatRoomMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the ChatMessage entity was cleared.
func (*ChatRoomMutation) MessagesIDs ¶
func (m *ChatRoomMutation) MessagesIDs() (ids []int)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*ChatRoomMutation) Name ¶
func (m *ChatRoomMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ChatRoomMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ChatRoom entity. If the ChatRoom object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatRoomMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ChatRoomMutation) OldIsPublic ¶
func (m *ChatRoomMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old "is_public" field's value of the ChatRoom entity. If the ChatRoom object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatRoomMutation) OldName ¶
func (m *ChatRoomMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ChatRoom entity. If the ChatRoom object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatRoomMutation) OldPasswordHash ¶
func (m *ChatRoomMutation) OldPasswordHash(ctx context.Context) (v string, err error)
OldPasswordHash returns the old "password_hash" field's value of the ChatRoom entity. If the ChatRoom object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChatRoomMutation) OwnerCleared ¶
func (m *ChatRoomMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*ChatRoomMutation) OwnerID ¶
func (m *ChatRoomMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*ChatRoomMutation) OwnerIDs ¶
func (m *ChatRoomMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*ChatRoomMutation) PasswordHash ¶
func (m *ChatRoomMutation) PasswordHash() (r string, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*ChatRoomMutation) PasswordHashCleared ¶
func (m *ChatRoomMutation) PasswordHashCleared() bool
PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.
func (*ChatRoomMutation) RemoveBanIDs ¶
func (m *ChatRoomMutation) RemoveBanIDs(ids ...int)
RemoveBanIDs removes the "bans" edge to the ChatBan entity by IDs.
func (*ChatRoomMutation) RemoveMessageIDs ¶
func (m *ChatRoomMutation) RemoveMessageIDs(ids ...int)
RemoveMessageIDs removes the "messages" edge to the ChatMessage entity by IDs.
func (*ChatRoomMutation) RemovedBansIDs ¶
func (m *ChatRoomMutation) RemovedBansIDs() (ids []int)
RemovedBans returns the removed IDs of the "bans" edge to the ChatBan entity.
func (*ChatRoomMutation) RemovedEdges ¶
func (m *ChatRoomMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatRoomMutation) RemovedIDs ¶
func (m *ChatRoomMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ChatRoomMutation) RemovedMessagesIDs ¶
func (m *ChatRoomMutation) RemovedMessagesIDs() (ids []int)
RemovedMessages returns the removed IDs of the "messages" edge to the ChatMessage entity.
func (*ChatRoomMutation) ResetBans ¶
func (m *ChatRoomMutation) ResetBans()
ResetBans resets all changes to the "bans" edge.
func (*ChatRoomMutation) ResetCreatedAt ¶
func (m *ChatRoomMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChatRoomMutation) ResetEdge ¶
func (m *ChatRoomMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ChatRoomMutation) ResetField ¶
func (m *ChatRoomMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ChatRoomMutation) ResetIsPublic ¶
func (m *ChatRoomMutation) ResetIsPublic()
ResetIsPublic resets all changes to the "is_public" field.
func (*ChatRoomMutation) ResetMessages ¶
func (m *ChatRoomMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*ChatRoomMutation) ResetName ¶
func (m *ChatRoomMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ChatRoomMutation) ResetOwner ¶
func (m *ChatRoomMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ChatRoomMutation) ResetPasswordHash ¶
func (m *ChatRoomMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*ChatRoomMutation) SetCreatedAt ¶
func (m *ChatRoomMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChatRoomMutation) SetField ¶
func (m *ChatRoomMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ChatRoomMutation) SetIsPublic ¶
func (m *ChatRoomMutation) SetIsPublic(b bool)
SetIsPublic sets the "is_public" field.
func (*ChatRoomMutation) SetName ¶
func (m *ChatRoomMutation) SetName(s string)
SetName sets the "name" field.
func (*ChatRoomMutation) SetOp ¶
func (m *ChatRoomMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatRoomMutation) SetOwnerID ¶
func (m *ChatRoomMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*ChatRoomMutation) SetPasswordHash ¶
func (m *ChatRoomMutation) SetPasswordHash(s string)
SetPasswordHash sets the "password_hash" field.
func (ChatRoomMutation) Tx ¶
func (m ChatRoomMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatRoomMutation) Type ¶
func (m *ChatRoomMutation) Type() string
Type returns the node type of this mutation (ChatRoom).
func (*ChatRoomMutation) Where ¶
func (m *ChatRoomMutation) Where(ps ...predicate.ChatRoom)
Where appends a list predicates to the ChatRoomMutation builder.
func (*ChatRoomMutation) WhereP ¶
func (m *ChatRoomMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatRoomMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatRoomQuery ¶
type ChatRoomQuery struct {
// contains filtered or unexported fields
}
ChatRoomQuery is the builder for querying ChatRoom entities.
func (*ChatRoomQuery) Aggregate ¶
func (_q *ChatRoomQuery) Aggregate(fns ...AggregateFunc) *ChatRoomSelect
Aggregate returns a ChatRoomSelect configured with the given aggregations.
func (*ChatRoomQuery) All ¶
func (_q *ChatRoomQuery) All(ctx context.Context) ([]*ChatRoom, error)
All executes the query and returns a list of ChatRooms.
func (*ChatRoomQuery) AllX ¶
func (_q *ChatRoomQuery) AllX(ctx context.Context) []*ChatRoom
AllX is like All, but panics if an error occurs.
func (*ChatRoomQuery) Clone ¶
func (_q *ChatRoomQuery) Clone() *ChatRoomQuery
Clone returns a duplicate of the ChatRoomQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatRoomQuery) Count ¶
func (_q *ChatRoomQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChatRoomQuery) CountX ¶
func (_q *ChatRoomQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChatRoomQuery) Exist ¶
func (_q *ChatRoomQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChatRoomQuery) ExistX ¶
func (_q *ChatRoomQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChatRoomQuery) First ¶
func (_q *ChatRoomQuery) First(ctx context.Context) (*ChatRoom, error)
First returns the first ChatRoom entity from the query. Returns a *NotFoundError when no ChatRoom was found.
func (*ChatRoomQuery) FirstID ¶
func (_q *ChatRoomQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ChatRoom ID from the query. Returns a *NotFoundError when no ChatRoom ID was found.
func (*ChatRoomQuery) FirstIDX ¶
func (_q *ChatRoomQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChatRoomQuery) FirstX ¶
func (_q *ChatRoomQuery) FirstX(ctx context.Context) *ChatRoom
FirstX is like First, but panics if an error occurs.
func (*ChatRoomQuery) GroupBy ¶
func (_q *ChatRoomQuery) GroupBy(field string, fields ...string) *ChatRoomGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.ChatRoom.Query().
GroupBy(chatroom.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ChatRoomQuery) IDs ¶
func (_q *ChatRoomQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ChatRoom IDs.
func (*ChatRoomQuery) IDsX ¶
func (_q *ChatRoomQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChatRoomQuery) Limit ¶
func (_q *ChatRoomQuery) Limit(limit int) *ChatRoomQuery
Limit the number of records to be returned by this query.
func (*ChatRoomQuery) Offset ¶
func (_q *ChatRoomQuery) Offset(offset int) *ChatRoomQuery
Offset to start from.
func (*ChatRoomQuery) Only ¶
func (_q *ChatRoomQuery) Only(ctx context.Context) (*ChatRoom, error)
Only returns a single ChatRoom entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChatRoom entity is found. Returns a *NotFoundError when no ChatRoom entities are found.
func (*ChatRoomQuery) OnlyID ¶
func (_q *ChatRoomQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ChatRoom ID in the query. Returns a *NotSingularError when more than one ChatRoom ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatRoomQuery) OnlyIDX ¶
func (_q *ChatRoomQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChatRoomQuery) OnlyX ¶
func (_q *ChatRoomQuery) OnlyX(ctx context.Context) *ChatRoom
OnlyX is like Only, but panics if an error occurs.
func (*ChatRoomQuery) Order ¶
func (_q *ChatRoomQuery) Order(o ...chatroom.OrderOption) *ChatRoomQuery
Order specifies how the records should be ordered.
func (*ChatRoomQuery) QueryBans ¶
func (_q *ChatRoomQuery) QueryBans() *ChatBanQuery
QueryBans chains the current query on the "bans" edge.
func (*ChatRoomQuery) QueryMessages ¶
func (_q *ChatRoomQuery) QueryMessages() *ChatMessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*ChatRoomQuery) QueryOwner ¶
func (_q *ChatRoomQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*ChatRoomQuery) Select ¶
func (_q *ChatRoomQuery) Select(fields ...string) *ChatRoomSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.ChatRoom.Query().
Select(chatroom.FieldName).
Scan(ctx, &v)
func (*ChatRoomQuery) Unique ¶
func (_q *ChatRoomQuery) Unique(unique bool) *ChatRoomQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ChatRoomQuery) Where ¶
func (_q *ChatRoomQuery) Where(ps ...predicate.ChatRoom) *ChatRoomQuery
Where adds a new predicate for the ChatRoomQuery builder.
func (*ChatRoomQuery) WithBans ¶
func (_q *ChatRoomQuery) WithBans(opts ...func(*ChatBanQuery)) *ChatRoomQuery
WithBans tells the query-builder to eager-load the nodes that are connected to the "bans" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatRoomQuery) WithMessages ¶
func (_q *ChatRoomQuery) WithMessages(opts ...func(*ChatMessageQuery)) *ChatRoomQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatRoomQuery) WithOwner ¶
func (_q *ChatRoomQuery) WithOwner(opts ...func(*UserQuery)) *ChatRoomQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type ChatRoomSelect ¶
type ChatRoomSelect struct {
*ChatRoomQuery
// contains filtered or unexported fields
}
ChatRoomSelect is the builder for selecting fields of ChatRoom entities.
func (*ChatRoomSelect) Aggregate ¶
func (_s *ChatRoomSelect) Aggregate(fns ...AggregateFunc) *ChatRoomSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatRoomSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatRoomSelect) Scan ¶
func (_s *ChatRoomSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatRoomSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatRoomUpdate ¶
type ChatRoomUpdate struct {
// contains filtered or unexported fields
}
ChatRoomUpdate is the builder for updating ChatRoom entities.
func (*ChatRoomUpdate) AddBanIDs ¶
func (_u *ChatRoomUpdate) AddBanIDs(ids ...int) *ChatRoomUpdate
AddBanIDs adds the "bans" edge to the ChatBan entity by IDs.
func (*ChatRoomUpdate) AddBans ¶
func (_u *ChatRoomUpdate) AddBans(v ...*ChatBan) *ChatRoomUpdate
AddBans adds the "bans" edges to the ChatBan entity.
func (*ChatRoomUpdate) AddMessageIDs ¶
func (_u *ChatRoomUpdate) AddMessageIDs(ids ...int) *ChatRoomUpdate
AddMessageIDs adds the "messages" edge to the ChatMessage entity by IDs.
func (*ChatRoomUpdate) AddMessages ¶
func (_u *ChatRoomUpdate) AddMessages(v ...*ChatMessage) *ChatRoomUpdate
AddMessages adds the "messages" edges to the ChatMessage entity.
func (*ChatRoomUpdate) ClearBans ¶
func (_u *ChatRoomUpdate) ClearBans() *ChatRoomUpdate
ClearBans clears all "bans" edges to the ChatBan entity.
func (*ChatRoomUpdate) ClearMessages ¶
func (_u *ChatRoomUpdate) ClearMessages() *ChatRoomUpdate
ClearMessages clears all "messages" edges to the ChatMessage entity.
func (*ChatRoomUpdate) ClearOwner ¶
func (_u *ChatRoomUpdate) ClearOwner() *ChatRoomUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*ChatRoomUpdate) ClearPasswordHash ¶
func (_u *ChatRoomUpdate) ClearPasswordHash() *ChatRoomUpdate
ClearPasswordHash clears the value of the "password_hash" field.
func (*ChatRoomUpdate) Exec ¶
func (_u *ChatRoomUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatRoomUpdate) ExecX ¶
func (_u *ChatRoomUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatRoomUpdate) Mutation ¶
func (_u *ChatRoomUpdate) Mutation() *ChatRoomMutation
Mutation returns the ChatRoomMutation object of the builder.
func (*ChatRoomUpdate) RemoveBanIDs ¶
func (_u *ChatRoomUpdate) RemoveBanIDs(ids ...int) *ChatRoomUpdate
RemoveBanIDs removes the "bans" edge to ChatBan entities by IDs.
func (*ChatRoomUpdate) RemoveBans ¶
func (_u *ChatRoomUpdate) RemoveBans(v ...*ChatBan) *ChatRoomUpdate
RemoveBans removes "bans" edges to ChatBan entities.
func (*ChatRoomUpdate) RemoveMessageIDs ¶
func (_u *ChatRoomUpdate) RemoveMessageIDs(ids ...int) *ChatRoomUpdate
RemoveMessageIDs removes the "messages" edge to ChatMessage entities by IDs.
func (*ChatRoomUpdate) RemoveMessages ¶
func (_u *ChatRoomUpdate) RemoveMessages(v ...*ChatMessage) *ChatRoomUpdate
RemoveMessages removes "messages" edges to ChatMessage entities.
func (*ChatRoomUpdate) Save ¶
func (_u *ChatRoomUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatRoomUpdate) SaveX ¶
func (_u *ChatRoomUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatRoomUpdate) SetIsPublic ¶
func (_u *ChatRoomUpdate) SetIsPublic(v bool) *ChatRoomUpdate
SetIsPublic sets the "is_public" field.
func (*ChatRoomUpdate) SetName ¶
func (_u *ChatRoomUpdate) SetName(v string) *ChatRoomUpdate
SetName sets the "name" field.
func (*ChatRoomUpdate) SetNillableIsPublic ¶
func (_u *ChatRoomUpdate) SetNillableIsPublic(v *bool) *ChatRoomUpdate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*ChatRoomUpdate) SetNillableName ¶
func (_u *ChatRoomUpdate) SetNillableName(v *string) *ChatRoomUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChatRoomUpdate) SetNillableOwnerID ¶
func (_u *ChatRoomUpdate) SetNillableOwnerID(id *int) *ChatRoomUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*ChatRoomUpdate) SetNillablePasswordHash ¶
func (_u *ChatRoomUpdate) SetNillablePasswordHash(v *string) *ChatRoomUpdate
SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.
func (*ChatRoomUpdate) SetOwner ¶
func (_u *ChatRoomUpdate) SetOwner(v *User) *ChatRoomUpdate
SetOwner sets the "owner" edge to the User entity.
func (*ChatRoomUpdate) SetOwnerID ¶
func (_u *ChatRoomUpdate) SetOwnerID(id int) *ChatRoomUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ChatRoomUpdate) SetPasswordHash ¶
func (_u *ChatRoomUpdate) SetPasswordHash(v string) *ChatRoomUpdate
SetPasswordHash sets the "password_hash" field.
func (*ChatRoomUpdate) Where ¶
func (_u *ChatRoomUpdate) Where(ps ...predicate.ChatRoom) *ChatRoomUpdate
Where appends a list predicates to the ChatRoomUpdate builder.
type ChatRoomUpdateOne ¶
type ChatRoomUpdateOne struct {
// contains filtered or unexported fields
}
ChatRoomUpdateOne is the builder for updating a single ChatRoom entity.
func (*ChatRoomUpdateOne) AddBanIDs ¶
func (_u *ChatRoomUpdateOne) AddBanIDs(ids ...int) *ChatRoomUpdateOne
AddBanIDs adds the "bans" edge to the ChatBan entity by IDs.
func (*ChatRoomUpdateOne) AddBans ¶
func (_u *ChatRoomUpdateOne) AddBans(v ...*ChatBan) *ChatRoomUpdateOne
AddBans adds the "bans" edges to the ChatBan entity.
func (*ChatRoomUpdateOne) AddMessageIDs ¶
func (_u *ChatRoomUpdateOne) AddMessageIDs(ids ...int) *ChatRoomUpdateOne
AddMessageIDs adds the "messages" edge to the ChatMessage entity by IDs.
func (*ChatRoomUpdateOne) AddMessages ¶
func (_u *ChatRoomUpdateOne) AddMessages(v ...*ChatMessage) *ChatRoomUpdateOne
AddMessages adds the "messages" edges to the ChatMessage entity.
func (*ChatRoomUpdateOne) ClearBans ¶
func (_u *ChatRoomUpdateOne) ClearBans() *ChatRoomUpdateOne
ClearBans clears all "bans" edges to the ChatBan entity.
func (*ChatRoomUpdateOne) ClearMessages ¶
func (_u *ChatRoomUpdateOne) ClearMessages() *ChatRoomUpdateOne
ClearMessages clears all "messages" edges to the ChatMessage entity.
func (*ChatRoomUpdateOne) ClearOwner ¶
func (_u *ChatRoomUpdateOne) ClearOwner() *ChatRoomUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*ChatRoomUpdateOne) ClearPasswordHash ¶
func (_u *ChatRoomUpdateOne) ClearPasswordHash() *ChatRoomUpdateOne
ClearPasswordHash clears the value of the "password_hash" field.
func (*ChatRoomUpdateOne) Exec ¶
func (_u *ChatRoomUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatRoomUpdateOne) ExecX ¶
func (_u *ChatRoomUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatRoomUpdateOne) Mutation ¶
func (_u *ChatRoomUpdateOne) Mutation() *ChatRoomMutation
Mutation returns the ChatRoomMutation object of the builder.
func (*ChatRoomUpdateOne) RemoveBanIDs ¶
func (_u *ChatRoomUpdateOne) RemoveBanIDs(ids ...int) *ChatRoomUpdateOne
RemoveBanIDs removes the "bans" edge to ChatBan entities by IDs.
func (*ChatRoomUpdateOne) RemoveBans ¶
func (_u *ChatRoomUpdateOne) RemoveBans(v ...*ChatBan) *ChatRoomUpdateOne
RemoveBans removes "bans" edges to ChatBan entities.
func (*ChatRoomUpdateOne) RemoveMessageIDs ¶
func (_u *ChatRoomUpdateOne) RemoveMessageIDs(ids ...int) *ChatRoomUpdateOne
RemoveMessageIDs removes the "messages" edge to ChatMessage entities by IDs.
func (*ChatRoomUpdateOne) RemoveMessages ¶
func (_u *ChatRoomUpdateOne) RemoveMessages(v ...*ChatMessage) *ChatRoomUpdateOne
RemoveMessages removes "messages" edges to ChatMessage entities.
func (*ChatRoomUpdateOne) Save ¶
func (_u *ChatRoomUpdateOne) Save(ctx context.Context) (*ChatRoom, error)
Save executes the query and returns the updated ChatRoom entity.
func (*ChatRoomUpdateOne) SaveX ¶
func (_u *ChatRoomUpdateOne) SaveX(ctx context.Context) *ChatRoom
SaveX is like Save, but panics if an error occurs.
func (*ChatRoomUpdateOne) Select ¶
func (_u *ChatRoomUpdateOne) Select(field string, fields ...string) *ChatRoomUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatRoomUpdateOne) SetIsPublic ¶
func (_u *ChatRoomUpdateOne) SetIsPublic(v bool) *ChatRoomUpdateOne
SetIsPublic sets the "is_public" field.
func (*ChatRoomUpdateOne) SetName ¶
func (_u *ChatRoomUpdateOne) SetName(v string) *ChatRoomUpdateOne
SetName sets the "name" field.
func (*ChatRoomUpdateOne) SetNillableIsPublic ¶
func (_u *ChatRoomUpdateOne) SetNillableIsPublic(v *bool) *ChatRoomUpdateOne
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*ChatRoomUpdateOne) SetNillableName ¶
func (_u *ChatRoomUpdateOne) SetNillableName(v *string) *ChatRoomUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ChatRoomUpdateOne) SetNillableOwnerID ¶
func (_u *ChatRoomUpdateOne) SetNillableOwnerID(id *int) *ChatRoomUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*ChatRoomUpdateOne) SetNillablePasswordHash ¶
func (_u *ChatRoomUpdateOne) SetNillablePasswordHash(v *string) *ChatRoomUpdateOne
SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.
func (*ChatRoomUpdateOne) SetOwner ¶
func (_u *ChatRoomUpdateOne) SetOwner(v *User) *ChatRoomUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*ChatRoomUpdateOne) SetOwnerID ¶
func (_u *ChatRoomUpdateOne) SetOwnerID(id int) *ChatRoomUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ChatRoomUpdateOne) SetPasswordHash ¶
func (_u *ChatRoomUpdateOne) SetPasswordHash(v string) *ChatRoomUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*ChatRoomUpdateOne) Where ¶
func (_u *ChatRoomUpdateOne) Where(ps ...predicate.ChatRoom) *ChatRoomUpdateOne
Where appends a list predicates to the ChatRoomUpdate builder.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// ChatBan is the client for interacting with the ChatBan builders.
ChatBan *ChatBanClient
// ChatMessage is the client for interacting with the ChatMessage builders.
ChatMessage *ChatMessageClient
// ChatRoom is the client for interacting with the ChatRoom builders.
ChatRoom *ChatRoomClient
// PasswordToken is the client for interacting with the PasswordToken builders.
PasswordToken *PasswordTokenClient
// PaymentCustomer is the client for interacting with the PaymentCustomer builders.
PaymentCustomer *PaymentCustomerClient
// PaymentIntent is the client for interacting with the PaymentIntent builders.
PaymentIntent *PaymentIntentClient
// PaymentMethod is the client for interacting with the PaymentMethod builders.
PaymentMethod *PaymentMethodClient
// Subscription is the client for interacting with the Subscription builders.
Subscription *SubscriptionClient
// User is the client for interacting with the User builders.
User *UserClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). ChatBan. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PasswordToken ¶
type PasswordToken struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Token holds the value of the "token" field.
Token string `json:"-"`
// UserID holds the value of the "user_id" field.
UserID int `json:"user_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PasswordTokenQuery when eager-loading is set.
Edges PasswordTokenEdges `json:"edges"`
// contains filtered or unexported fields
}
PasswordToken is the model entity for the PasswordToken schema.
func (*PasswordToken) QueryUser ¶
func (_m *PasswordToken) QueryUser() *UserQuery
QueryUser queries the "user" edge of the PasswordToken entity.
func (*PasswordToken) String ¶
func (_m *PasswordToken) String() string
String implements the fmt.Stringer.
func (*PasswordToken) Unwrap ¶
func (_m *PasswordToken) Unwrap() *PasswordToken
Unwrap unwraps the PasswordToken entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*PasswordToken) Update ¶
func (_m *PasswordToken) Update() *PasswordTokenUpdateOne
Update returns a builder for updating this PasswordToken. Note that you need to call PasswordToken.Unwrap() before calling this method if this PasswordToken was returned from a transaction, and the transaction was committed or rolled back.
type PasswordTokenClient ¶
type PasswordTokenClient struct {
// contains filtered or unexported fields
}
PasswordTokenClient is a client for the PasswordToken schema.
func NewPasswordTokenClient ¶
func NewPasswordTokenClient(c config) *PasswordTokenClient
NewPasswordTokenClient returns a client for the PasswordToken from the given config.
func (*PasswordTokenClient) Create ¶
func (c *PasswordTokenClient) Create() *PasswordTokenCreate
Create returns a builder for creating a PasswordToken entity.
func (*PasswordTokenClient) CreateBulk ¶
func (c *PasswordTokenClient) CreateBulk(builders ...*PasswordTokenCreate) *PasswordTokenCreateBulk
CreateBulk returns a builder for creating a bulk of PasswordToken entities.
func (*PasswordTokenClient) Delete ¶
func (c *PasswordTokenClient) Delete() *PasswordTokenDelete
Delete returns a delete builder for PasswordToken.
func (*PasswordTokenClient) DeleteOne ¶
func (c *PasswordTokenClient) DeleteOne(_m *PasswordToken) *PasswordTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PasswordTokenClient) DeleteOneID ¶
func (c *PasswordTokenClient) DeleteOneID(id int) *PasswordTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PasswordTokenClient) Get ¶
func (c *PasswordTokenClient) Get(ctx context.Context, id int) (*PasswordToken, error)
Get returns a PasswordToken entity by its id.
func (*PasswordTokenClient) GetX ¶
func (c *PasswordTokenClient) GetX(ctx context.Context, id int) *PasswordToken
GetX is like Get, but panics if an error occurs.
func (*PasswordTokenClient) Hooks ¶
func (c *PasswordTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PasswordTokenClient) Intercept ¶
func (c *PasswordTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `passwordtoken.Intercept(f(g(h())))`.
func (*PasswordTokenClient) Interceptors ¶
func (c *PasswordTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PasswordTokenClient) MapCreateBulk ¶
func (c *PasswordTokenClient) MapCreateBulk(slice any, setFunc func(*PasswordTokenCreate, int)) *PasswordTokenCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PasswordTokenClient) Query ¶
func (c *PasswordTokenClient) Query() *PasswordTokenQuery
Query returns a query builder for PasswordToken.
func (*PasswordTokenClient) QueryUser ¶
func (c *PasswordTokenClient) QueryUser(_m *PasswordToken) *UserQuery
QueryUser queries the user edge of a PasswordToken.
func (*PasswordTokenClient) Update ¶
func (c *PasswordTokenClient) Update() *PasswordTokenUpdate
Update returns an update builder for PasswordToken.
func (*PasswordTokenClient) UpdateOne ¶
func (c *PasswordTokenClient) UpdateOne(_m *PasswordToken) *PasswordTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PasswordTokenClient) UpdateOneID ¶
func (c *PasswordTokenClient) UpdateOneID(id int) *PasswordTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PasswordTokenClient) Use ¶
func (c *PasswordTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `passwordtoken.Hooks(f(g(h())))`.
type PasswordTokenCreate ¶
type PasswordTokenCreate struct {
// contains filtered or unexported fields
}
PasswordTokenCreate is the builder for creating a PasswordToken entity.
func (*PasswordTokenCreate) Exec ¶
func (_c *PasswordTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PasswordTokenCreate) ExecX ¶
func (_c *PasswordTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenCreate) Mutation ¶
func (_c *PasswordTokenCreate) Mutation() *PasswordTokenMutation
Mutation returns the PasswordTokenMutation object of the builder.
func (*PasswordTokenCreate) Save ¶
func (_c *PasswordTokenCreate) Save(ctx context.Context) (*PasswordToken, error)
Save creates the PasswordToken in the database.
func (*PasswordTokenCreate) SaveX ¶
func (_c *PasswordTokenCreate) SaveX(ctx context.Context) *PasswordToken
SaveX calls Save and panics if Save returns an error.
func (*PasswordTokenCreate) SetCreatedAt ¶
func (_c *PasswordTokenCreate) SetCreatedAt(v time.Time) *PasswordTokenCreate
SetCreatedAt sets the "created_at" field.
func (*PasswordTokenCreate) SetNillableCreatedAt ¶
func (_c *PasswordTokenCreate) SetNillableCreatedAt(v *time.Time) *PasswordTokenCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PasswordTokenCreate) SetToken ¶
func (_c *PasswordTokenCreate) SetToken(v string) *PasswordTokenCreate
SetToken sets the "token" field.
func (*PasswordTokenCreate) SetUser ¶
func (_c *PasswordTokenCreate) SetUser(v *User) *PasswordTokenCreate
SetUser sets the "user" edge to the User entity.
func (*PasswordTokenCreate) SetUserID ¶
func (_c *PasswordTokenCreate) SetUserID(v int) *PasswordTokenCreate
SetUserID sets the "user_id" field.
type PasswordTokenCreateBulk ¶
type PasswordTokenCreateBulk struct {
// contains filtered or unexported fields
}
PasswordTokenCreateBulk is the builder for creating many PasswordToken entities in bulk.
func (*PasswordTokenCreateBulk) Exec ¶
func (_c *PasswordTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PasswordTokenCreateBulk) ExecX ¶
func (_c *PasswordTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenCreateBulk) Save ¶
func (_c *PasswordTokenCreateBulk) Save(ctx context.Context) ([]*PasswordToken, error)
Save creates the PasswordToken entities in the database.
func (*PasswordTokenCreateBulk) SaveX ¶
func (_c *PasswordTokenCreateBulk) SaveX(ctx context.Context) []*PasswordToken
SaveX is like Save, but panics if an error occurs.
type PasswordTokenDelete ¶
type PasswordTokenDelete struct {
// contains filtered or unexported fields
}
PasswordTokenDelete is the builder for deleting a PasswordToken entity.
func (*PasswordTokenDelete) Exec ¶
func (_d *PasswordTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PasswordTokenDelete) ExecX ¶
func (_d *PasswordTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenDelete) Where ¶
func (_d *PasswordTokenDelete) Where(ps ...predicate.PasswordToken) *PasswordTokenDelete
Where appends a list predicates to the PasswordTokenDelete builder.
type PasswordTokenDeleteOne ¶
type PasswordTokenDeleteOne struct {
// contains filtered or unexported fields
}
PasswordTokenDeleteOne is the builder for deleting a single PasswordToken entity.
func (*PasswordTokenDeleteOne) Exec ¶
func (_d *PasswordTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PasswordTokenDeleteOne) ExecX ¶
func (_d *PasswordTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenDeleteOne) Where ¶
func (_d *PasswordTokenDeleteOne) Where(ps ...predicate.PasswordToken) *PasswordTokenDeleteOne
Where appends a list predicates to the PasswordTokenDelete builder.
type PasswordTokenEdges ¶
type PasswordTokenEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
PasswordTokenEdges holds the relations/edges for other nodes in the graph.
func (PasswordTokenEdges) UserOrErr ¶
func (e PasswordTokenEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PasswordTokenGroupBy ¶
type PasswordTokenGroupBy struct {
// contains filtered or unexported fields
}
PasswordTokenGroupBy is the group-by builder for PasswordToken entities.
func (*PasswordTokenGroupBy) Aggregate ¶
func (_g *PasswordTokenGroupBy) Aggregate(fns ...AggregateFunc) *PasswordTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PasswordTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PasswordTokenGroupBy) Scan ¶
func (_g *PasswordTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PasswordTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PasswordTokenMutation ¶
type PasswordTokenMutation struct {
// contains filtered or unexported fields
}
PasswordTokenMutation represents an operation that mutates the PasswordToken nodes in the graph.
func (*PasswordTokenMutation) AddField ¶
func (m *PasswordTokenMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PasswordTokenMutation) AddedEdges ¶
func (m *PasswordTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PasswordTokenMutation) AddedField ¶
func (m *PasswordTokenMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PasswordTokenMutation) AddedFields ¶
func (m *PasswordTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PasswordTokenMutation) AddedIDs ¶
func (m *PasswordTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PasswordTokenMutation) ClearEdge ¶
func (m *PasswordTokenMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PasswordTokenMutation) ClearField ¶
func (m *PasswordTokenMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PasswordTokenMutation) ClearUser ¶
func (m *PasswordTokenMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*PasswordTokenMutation) ClearedEdges ¶
func (m *PasswordTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PasswordTokenMutation) ClearedFields ¶
func (m *PasswordTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PasswordTokenMutation) Client ¶
func (m PasswordTokenMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PasswordTokenMutation) CreatedAt ¶
func (m *PasswordTokenMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PasswordTokenMutation) EdgeCleared ¶
func (m *PasswordTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PasswordTokenMutation) Field ¶
func (m *PasswordTokenMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PasswordTokenMutation) FieldCleared ¶
func (m *PasswordTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PasswordTokenMutation) Fields ¶
func (m *PasswordTokenMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PasswordTokenMutation) ID ¶
func (m *PasswordTokenMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PasswordTokenMutation) IDs ¶
func (m *PasswordTokenMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PasswordTokenMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PasswordToken entity. If the PasswordToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PasswordTokenMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PasswordTokenMutation) OldToken ¶
func (m *PasswordTokenMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the PasswordToken entity. If the PasswordToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PasswordTokenMutation) OldUserID ¶
func (m *PasswordTokenMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the PasswordToken entity. If the PasswordToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PasswordTokenMutation) Op ¶
func (m *PasswordTokenMutation) Op() Op
Op returns the operation name.
func (*PasswordTokenMutation) RemovedEdges ¶
func (m *PasswordTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PasswordTokenMutation) RemovedIDs ¶
func (m *PasswordTokenMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PasswordTokenMutation) ResetCreatedAt ¶
func (m *PasswordTokenMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PasswordTokenMutation) ResetEdge ¶
func (m *PasswordTokenMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PasswordTokenMutation) ResetField ¶
func (m *PasswordTokenMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PasswordTokenMutation) ResetToken ¶
func (m *PasswordTokenMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*PasswordTokenMutation) ResetUser ¶
func (m *PasswordTokenMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*PasswordTokenMutation) ResetUserID ¶
func (m *PasswordTokenMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*PasswordTokenMutation) SetCreatedAt ¶
func (m *PasswordTokenMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PasswordTokenMutation) SetField ¶
func (m *PasswordTokenMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PasswordTokenMutation) SetOp ¶
func (m *PasswordTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PasswordTokenMutation) SetToken ¶
func (m *PasswordTokenMutation) SetToken(s string)
SetToken sets the "token" field.
func (*PasswordTokenMutation) SetUserID ¶
func (m *PasswordTokenMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*PasswordTokenMutation) Token ¶
func (m *PasswordTokenMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (PasswordTokenMutation) Tx ¶
func (m PasswordTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PasswordTokenMutation) Type ¶
func (m *PasswordTokenMutation) Type() string
Type returns the node type of this mutation (PasswordToken).
func (*PasswordTokenMutation) UserCleared ¶
func (m *PasswordTokenMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*PasswordTokenMutation) UserID ¶
func (m *PasswordTokenMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*PasswordTokenMutation) UserIDs ¶
func (m *PasswordTokenMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*PasswordTokenMutation) Where ¶
func (m *PasswordTokenMutation) Where(ps ...predicate.PasswordToken)
Where appends a list predicates to the PasswordTokenMutation builder.
func (*PasswordTokenMutation) WhereP ¶
func (m *PasswordTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PasswordTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PasswordTokenQuery ¶
type PasswordTokenQuery struct {
// contains filtered or unexported fields
}
PasswordTokenQuery is the builder for querying PasswordToken entities.
func (*PasswordTokenQuery) Aggregate ¶
func (_q *PasswordTokenQuery) Aggregate(fns ...AggregateFunc) *PasswordTokenSelect
Aggregate returns a PasswordTokenSelect configured with the given aggregations.
func (*PasswordTokenQuery) All ¶
func (_q *PasswordTokenQuery) All(ctx context.Context) ([]*PasswordToken, error)
All executes the query and returns a list of PasswordTokens.
func (*PasswordTokenQuery) AllX ¶
func (_q *PasswordTokenQuery) AllX(ctx context.Context) []*PasswordToken
AllX is like All, but panics if an error occurs.
func (*PasswordTokenQuery) Clone ¶
func (_q *PasswordTokenQuery) Clone() *PasswordTokenQuery
Clone returns a duplicate of the PasswordTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PasswordTokenQuery) Count ¶
func (_q *PasswordTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PasswordTokenQuery) CountX ¶
func (_q *PasswordTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PasswordTokenQuery) Exist ¶
func (_q *PasswordTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PasswordTokenQuery) ExistX ¶
func (_q *PasswordTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PasswordTokenQuery) First ¶
func (_q *PasswordTokenQuery) First(ctx context.Context) (*PasswordToken, error)
First returns the first PasswordToken entity from the query. Returns a *NotFoundError when no PasswordToken was found.
func (*PasswordTokenQuery) FirstID ¶
func (_q *PasswordTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PasswordToken ID from the query. Returns a *NotFoundError when no PasswordToken ID was found.
func (*PasswordTokenQuery) FirstIDX ¶
func (_q *PasswordTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PasswordTokenQuery) FirstX ¶
func (_q *PasswordTokenQuery) FirstX(ctx context.Context) *PasswordToken
FirstX is like First, but panics if an error occurs.
func (*PasswordTokenQuery) GroupBy ¶
func (_q *PasswordTokenQuery) GroupBy(field string, fields ...string) *PasswordTokenGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Token string `json:"token,omitempty"`
Count int `json:"count,omitempty"`
}
client.PasswordToken.Query().
GroupBy(passwordtoken.FieldToken).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PasswordTokenQuery) IDs ¶
func (_q *PasswordTokenQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PasswordToken IDs.
func (*PasswordTokenQuery) IDsX ¶
func (_q *PasswordTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PasswordTokenQuery) Limit ¶
func (_q *PasswordTokenQuery) Limit(limit int) *PasswordTokenQuery
Limit the number of records to be returned by this query.
func (*PasswordTokenQuery) Offset ¶
func (_q *PasswordTokenQuery) Offset(offset int) *PasswordTokenQuery
Offset to start from.
func (*PasswordTokenQuery) Only ¶
func (_q *PasswordTokenQuery) Only(ctx context.Context) (*PasswordToken, error)
Only returns a single PasswordToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PasswordToken entity is found. Returns a *NotFoundError when no PasswordToken entities are found.
func (*PasswordTokenQuery) OnlyID ¶
func (_q *PasswordTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PasswordToken ID in the query. Returns a *NotSingularError when more than one PasswordToken ID is found. Returns a *NotFoundError when no entities are found.
func (*PasswordTokenQuery) OnlyIDX ¶
func (_q *PasswordTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PasswordTokenQuery) OnlyX ¶
func (_q *PasswordTokenQuery) OnlyX(ctx context.Context) *PasswordToken
OnlyX is like Only, but panics if an error occurs.
func (*PasswordTokenQuery) Order ¶
func (_q *PasswordTokenQuery) Order(o ...passwordtoken.OrderOption) *PasswordTokenQuery
Order specifies how the records should be ordered.
func (*PasswordTokenQuery) QueryUser ¶
func (_q *PasswordTokenQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*PasswordTokenQuery) Select ¶
func (_q *PasswordTokenQuery) Select(fields ...string) *PasswordTokenSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Token string `json:"token,omitempty"`
}
client.PasswordToken.Query().
Select(passwordtoken.FieldToken).
Scan(ctx, &v)
func (*PasswordTokenQuery) Unique ¶
func (_q *PasswordTokenQuery) Unique(unique bool) *PasswordTokenQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PasswordTokenQuery) Where ¶
func (_q *PasswordTokenQuery) Where(ps ...predicate.PasswordToken) *PasswordTokenQuery
Where adds a new predicate for the PasswordTokenQuery builder.
func (*PasswordTokenQuery) WithUser ¶
func (_q *PasswordTokenQuery) WithUser(opts ...func(*UserQuery)) *PasswordTokenQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type PasswordTokenSelect ¶
type PasswordTokenSelect struct {
*PasswordTokenQuery
// contains filtered or unexported fields
}
PasswordTokenSelect is the builder for selecting fields of PasswordToken entities.
func (*PasswordTokenSelect) Aggregate ¶
func (_s *PasswordTokenSelect) Aggregate(fns ...AggregateFunc) *PasswordTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PasswordTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PasswordTokenSelect) Scan ¶
func (_s *PasswordTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PasswordTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PasswordTokenUpdate ¶
type PasswordTokenUpdate struct {
// contains filtered or unexported fields
}
PasswordTokenUpdate is the builder for updating PasswordToken entities.
func (*PasswordTokenUpdate) ClearUser ¶
func (_u *PasswordTokenUpdate) ClearUser() *PasswordTokenUpdate
ClearUser clears the "user" edge to the User entity.
func (*PasswordTokenUpdate) Exec ¶
func (_u *PasswordTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PasswordTokenUpdate) ExecX ¶
func (_u *PasswordTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenUpdate) Mutation ¶
func (_u *PasswordTokenUpdate) Mutation() *PasswordTokenMutation
Mutation returns the PasswordTokenMutation object of the builder.
func (*PasswordTokenUpdate) Save ¶
func (_u *PasswordTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PasswordTokenUpdate) SaveX ¶
func (_u *PasswordTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PasswordTokenUpdate) SetCreatedAt ¶
func (_u *PasswordTokenUpdate) SetCreatedAt(v time.Time) *PasswordTokenUpdate
SetCreatedAt sets the "created_at" field.
func (*PasswordTokenUpdate) SetNillableCreatedAt ¶
func (_u *PasswordTokenUpdate) SetNillableCreatedAt(v *time.Time) *PasswordTokenUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PasswordTokenUpdate) SetNillableToken ¶
func (_u *PasswordTokenUpdate) SetNillableToken(v *string) *PasswordTokenUpdate
SetNillableToken sets the "token" field if the given value is not nil.
func (*PasswordTokenUpdate) SetNillableUserID ¶
func (_u *PasswordTokenUpdate) SetNillableUserID(v *int) *PasswordTokenUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PasswordTokenUpdate) SetToken ¶
func (_u *PasswordTokenUpdate) SetToken(v string) *PasswordTokenUpdate
SetToken sets the "token" field.
func (*PasswordTokenUpdate) SetUser ¶
func (_u *PasswordTokenUpdate) SetUser(v *User) *PasswordTokenUpdate
SetUser sets the "user" edge to the User entity.
func (*PasswordTokenUpdate) SetUserID ¶
func (_u *PasswordTokenUpdate) SetUserID(v int) *PasswordTokenUpdate
SetUserID sets the "user_id" field.
func (*PasswordTokenUpdate) Where ¶
func (_u *PasswordTokenUpdate) Where(ps ...predicate.PasswordToken) *PasswordTokenUpdate
Where appends a list predicates to the PasswordTokenUpdate builder.
type PasswordTokenUpdateOne ¶
type PasswordTokenUpdateOne struct {
// contains filtered or unexported fields
}
PasswordTokenUpdateOne is the builder for updating a single PasswordToken entity.
func (*PasswordTokenUpdateOne) ClearUser ¶
func (_u *PasswordTokenUpdateOne) ClearUser() *PasswordTokenUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*PasswordTokenUpdateOne) Exec ¶
func (_u *PasswordTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PasswordTokenUpdateOne) ExecX ¶
func (_u *PasswordTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasswordTokenUpdateOne) Mutation ¶
func (_u *PasswordTokenUpdateOne) Mutation() *PasswordTokenMutation
Mutation returns the PasswordTokenMutation object of the builder.
func (*PasswordTokenUpdateOne) Save ¶
func (_u *PasswordTokenUpdateOne) Save(ctx context.Context) (*PasswordToken, error)
Save executes the query and returns the updated PasswordToken entity.
func (*PasswordTokenUpdateOne) SaveX ¶
func (_u *PasswordTokenUpdateOne) SaveX(ctx context.Context) *PasswordToken
SaveX is like Save, but panics if an error occurs.
func (*PasswordTokenUpdateOne) Select ¶
func (_u *PasswordTokenUpdateOne) Select(field string, fields ...string) *PasswordTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PasswordTokenUpdateOne) SetCreatedAt ¶
func (_u *PasswordTokenUpdateOne) SetCreatedAt(v time.Time) *PasswordTokenUpdateOne
SetCreatedAt sets the "created_at" field.
func (*PasswordTokenUpdateOne) SetNillableCreatedAt ¶
func (_u *PasswordTokenUpdateOne) SetNillableCreatedAt(v *time.Time) *PasswordTokenUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PasswordTokenUpdateOne) SetNillableToken ¶
func (_u *PasswordTokenUpdateOne) SetNillableToken(v *string) *PasswordTokenUpdateOne
SetNillableToken sets the "token" field if the given value is not nil.
func (*PasswordTokenUpdateOne) SetNillableUserID ¶
func (_u *PasswordTokenUpdateOne) SetNillableUserID(v *int) *PasswordTokenUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PasswordTokenUpdateOne) SetToken ¶
func (_u *PasswordTokenUpdateOne) SetToken(v string) *PasswordTokenUpdateOne
SetToken sets the "token" field.
func (*PasswordTokenUpdateOne) SetUser ¶
func (_u *PasswordTokenUpdateOne) SetUser(v *User) *PasswordTokenUpdateOne
SetUser sets the "user" edge to the User entity.
func (*PasswordTokenUpdateOne) SetUserID ¶
func (_u *PasswordTokenUpdateOne) SetUserID(v int) *PasswordTokenUpdateOne
SetUserID sets the "user_id" field.
func (*PasswordTokenUpdateOne) Where ¶
func (_u *PasswordTokenUpdateOne) Where(ps ...predicate.PasswordToken) *PasswordTokenUpdateOne
Where appends a list predicates to the PasswordTokenUpdate builder.
type PasswordTokens ¶
type PasswordTokens []*PasswordToken
PasswordTokens is a parsable slice of PasswordToken.
type PaymentCustomer ¶
type PaymentCustomer struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// External payment provider customer ID (e.g., Stripe customer ID)
ProviderCustomerID string `json:"provider_customer_id,omitempty"`
// Payment provider name
Provider string `json:"provider,omitempty"`
// Customer email from payment provider
Email string `json:"email,omitempty"`
// Customer name from payment provider
Name string `json:"name,omitempty"`
// Additional customer data from payment provider
Metadata map[string]interface{} `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PaymentCustomerQuery when eager-loading is set.
Edges PaymentCustomerEdges `json:"edges"`
// contains filtered or unexported fields
}
PaymentCustomer is the model entity for the PaymentCustomer schema.
func (*PaymentCustomer) QueryPaymentIntents ¶
func (_m *PaymentCustomer) QueryPaymentIntents() *PaymentIntentQuery
QueryPaymentIntents queries the "payment_intents" edge of the PaymentCustomer entity.
func (*PaymentCustomer) QueryPaymentMethods ¶
func (_m *PaymentCustomer) QueryPaymentMethods() *PaymentMethodQuery
QueryPaymentMethods queries the "payment_methods" edge of the PaymentCustomer entity.
func (*PaymentCustomer) QuerySubscriptions ¶
func (_m *PaymentCustomer) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions queries the "subscriptions" edge of the PaymentCustomer entity.
func (*PaymentCustomer) QueryUser ¶
func (_m *PaymentCustomer) QueryUser() *UserQuery
QueryUser queries the "user" edge of the PaymentCustomer entity.
func (*PaymentCustomer) String ¶
func (_m *PaymentCustomer) String() string
String implements the fmt.Stringer.
func (*PaymentCustomer) Unwrap ¶
func (_m *PaymentCustomer) Unwrap() *PaymentCustomer
Unwrap unwraps the PaymentCustomer entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*PaymentCustomer) Update ¶
func (_m *PaymentCustomer) Update() *PaymentCustomerUpdateOne
Update returns a builder for updating this PaymentCustomer. Note that you need to call PaymentCustomer.Unwrap() before calling this method if this PaymentCustomer was returned from a transaction, and the transaction was committed or rolled back.
type PaymentCustomerClient ¶
type PaymentCustomerClient struct {
// contains filtered or unexported fields
}
PaymentCustomerClient is a client for the PaymentCustomer schema.
func NewPaymentCustomerClient ¶
func NewPaymentCustomerClient(c config) *PaymentCustomerClient
NewPaymentCustomerClient returns a client for the PaymentCustomer from the given config.
func (*PaymentCustomerClient) Create ¶
func (c *PaymentCustomerClient) Create() *PaymentCustomerCreate
Create returns a builder for creating a PaymentCustomer entity.
func (*PaymentCustomerClient) CreateBulk ¶
func (c *PaymentCustomerClient) CreateBulk(builders ...*PaymentCustomerCreate) *PaymentCustomerCreateBulk
CreateBulk returns a builder for creating a bulk of PaymentCustomer entities.
func (*PaymentCustomerClient) Delete ¶
func (c *PaymentCustomerClient) Delete() *PaymentCustomerDelete
Delete returns a delete builder for PaymentCustomer.
func (*PaymentCustomerClient) DeleteOne ¶
func (c *PaymentCustomerClient) DeleteOne(_m *PaymentCustomer) *PaymentCustomerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PaymentCustomerClient) DeleteOneID ¶
func (c *PaymentCustomerClient) DeleteOneID(id int) *PaymentCustomerDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PaymentCustomerClient) Get ¶
func (c *PaymentCustomerClient) Get(ctx context.Context, id int) (*PaymentCustomer, error)
Get returns a PaymentCustomer entity by its id.
func (*PaymentCustomerClient) GetX ¶
func (c *PaymentCustomerClient) GetX(ctx context.Context, id int) *PaymentCustomer
GetX is like Get, but panics if an error occurs.
func (*PaymentCustomerClient) Hooks ¶
func (c *PaymentCustomerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PaymentCustomerClient) Intercept ¶
func (c *PaymentCustomerClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `paymentcustomer.Intercept(f(g(h())))`.
func (*PaymentCustomerClient) Interceptors ¶
func (c *PaymentCustomerClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PaymentCustomerClient) MapCreateBulk ¶
func (c *PaymentCustomerClient) MapCreateBulk(slice any, setFunc func(*PaymentCustomerCreate, int)) *PaymentCustomerCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PaymentCustomerClient) Query ¶
func (c *PaymentCustomerClient) Query() *PaymentCustomerQuery
Query returns a query builder for PaymentCustomer.
func (*PaymentCustomerClient) QueryPaymentIntents ¶
func (c *PaymentCustomerClient) QueryPaymentIntents(_m *PaymentCustomer) *PaymentIntentQuery
QueryPaymentIntents queries the payment_intents edge of a PaymentCustomer.
func (*PaymentCustomerClient) QueryPaymentMethods ¶
func (c *PaymentCustomerClient) QueryPaymentMethods(_m *PaymentCustomer) *PaymentMethodQuery
QueryPaymentMethods queries the payment_methods edge of a PaymentCustomer.
func (*PaymentCustomerClient) QuerySubscriptions ¶
func (c *PaymentCustomerClient) QuerySubscriptions(_m *PaymentCustomer) *SubscriptionQuery
QuerySubscriptions queries the subscriptions edge of a PaymentCustomer.
func (*PaymentCustomerClient) QueryUser ¶
func (c *PaymentCustomerClient) QueryUser(_m *PaymentCustomer) *UserQuery
QueryUser queries the user edge of a PaymentCustomer.
func (*PaymentCustomerClient) Update ¶
func (c *PaymentCustomerClient) Update() *PaymentCustomerUpdate
Update returns an update builder for PaymentCustomer.
func (*PaymentCustomerClient) UpdateOne ¶
func (c *PaymentCustomerClient) UpdateOne(_m *PaymentCustomer) *PaymentCustomerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PaymentCustomerClient) UpdateOneID ¶
func (c *PaymentCustomerClient) UpdateOneID(id int) *PaymentCustomerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PaymentCustomerClient) Use ¶
func (c *PaymentCustomerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `paymentcustomer.Hooks(f(g(h())))`.
type PaymentCustomerCreate ¶
type PaymentCustomerCreate struct {
// contains filtered or unexported fields
}
PaymentCustomerCreate is the builder for creating a PaymentCustomer entity.
func (*PaymentCustomerCreate) AddPaymentIntentIDs ¶
func (_c *PaymentCustomerCreate) AddPaymentIntentIDs(ids ...int) *PaymentCustomerCreate
AddPaymentIntentIDs adds the "payment_intents" edge to the PaymentIntent entity by IDs.
func (*PaymentCustomerCreate) AddPaymentIntents ¶
func (_c *PaymentCustomerCreate) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerCreate
AddPaymentIntents adds the "payment_intents" edges to the PaymentIntent entity.
func (*PaymentCustomerCreate) AddPaymentMethodIDs ¶
func (_c *PaymentCustomerCreate) AddPaymentMethodIDs(ids ...int) *PaymentCustomerCreate
AddPaymentMethodIDs adds the "payment_methods" edge to the PaymentMethod entity by IDs.
func (*PaymentCustomerCreate) AddPaymentMethods ¶
func (_c *PaymentCustomerCreate) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerCreate
AddPaymentMethods adds the "payment_methods" edges to the PaymentMethod entity.
func (*PaymentCustomerCreate) AddSubscriptionIDs ¶
func (_c *PaymentCustomerCreate) AddSubscriptionIDs(ids ...int) *PaymentCustomerCreate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*PaymentCustomerCreate) AddSubscriptions ¶
func (_c *PaymentCustomerCreate) AddSubscriptions(v ...*Subscription) *PaymentCustomerCreate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*PaymentCustomerCreate) Exec ¶
func (_c *PaymentCustomerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentCustomerCreate) ExecX ¶
func (_c *PaymentCustomerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerCreate) Mutation ¶
func (_c *PaymentCustomerCreate) Mutation() *PaymentCustomerMutation
Mutation returns the PaymentCustomerMutation object of the builder.
func (*PaymentCustomerCreate) Save ¶
func (_c *PaymentCustomerCreate) Save(ctx context.Context) (*PaymentCustomer, error)
Save creates the PaymentCustomer in the database.
func (*PaymentCustomerCreate) SaveX ¶
func (_c *PaymentCustomerCreate) SaveX(ctx context.Context) *PaymentCustomer
SaveX calls Save and panics if Save returns an error.
func (*PaymentCustomerCreate) SetCreatedAt ¶
func (_c *PaymentCustomerCreate) SetCreatedAt(v time.Time) *PaymentCustomerCreate
SetCreatedAt sets the "created_at" field.
func (*PaymentCustomerCreate) SetEmail ¶
func (_c *PaymentCustomerCreate) SetEmail(v string) *PaymentCustomerCreate
SetEmail sets the "email" field.
func (*PaymentCustomerCreate) SetMetadata ¶
func (_c *PaymentCustomerCreate) SetMetadata(v map[string]interface{}) *PaymentCustomerCreate
SetMetadata sets the "metadata" field.
func (*PaymentCustomerCreate) SetName ¶
func (_c *PaymentCustomerCreate) SetName(v string) *PaymentCustomerCreate
SetName sets the "name" field.
func (*PaymentCustomerCreate) SetNillableCreatedAt ¶
func (_c *PaymentCustomerCreate) SetNillableCreatedAt(v *time.Time) *PaymentCustomerCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PaymentCustomerCreate) SetNillableName ¶
func (_c *PaymentCustomerCreate) SetNillableName(v *string) *PaymentCustomerCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*PaymentCustomerCreate) SetNillableProvider ¶
func (_c *PaymentCustomerCreate) SetNillableProvider(v *string) *PaymentCustomerCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentCustomerCreate) SetNillableUpdatedAt ¶
func (_c *PaymentCustomerCreate) SetNillableUpdatedAt(v *time.Time) *PaymentCustomerCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PaymentCustomerCreate) SetProvider ¶
func (_c *PaymentCustomerCreate) SetProvider(v string) *PaymentCustomerCreate
SetProvider sets the "provider" field.
func (*PaymentCustomerCreate) SetProviderCustomerID ¶
func (_c *PaymentCustomerCreate) SetProviderCustomerID(v string) *PaymentCustomerCreate
SetProviderCustomerID sets the "provider_customer_id" field.
func (*PaymentCustomerCreate) SetUpdatedAt ¶
func (_c *PaymentCustomerCreate) SetUpdatedAt(v time.Time) *PaymentCustomerCreate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentCustomerCreate) SetUser ¶
func (_c *PaymentCustomerCreate) SetUser(v *User) *PaymentCustomerCreate
SetUser sets the "user" edge to the User entity.
func (*PaymentCustomerCreate) SetUserID ¶
func (_c *PaymentCustomerCreate) SetUserID(id int) *PaymentCustomerCreate
SetUserID sets the "user" edge to the User entity by ID.
type PaymentCustomerCreateBulk ¶
type PaymentCustomerCreateBulk struct {
// contains filtered or unexported fields
}
PaymentCustomerCreateBulk is the builder for creating many PaymentCustomer entities in bulk.
func (*PaymentCustomerCreateBulk) Exec ¶
func (_c *PaymentCustomerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentCustomerCreateBulk) ExecX ¶
func (_c *PaymentCustomerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerCreateBulk) Save ¶
func (_c *PaymentCustomerCreateBulk) Save(ctx context.Context) ([]*PaymentCustomer, error)
Save creates the PaymentCustomer entities in the database.
func (*PaymentCustomerCreateBulk) SaveX ¶
func (_c *PaymentCustomerCreateBulk) SaveX(ctx context.Context) []*PaymentCustomer
SaveX is like Save, but panics if an error occurs.
type PaymentCustomerDelete ¶
type PaymentCustomerDelete struct {
// contains filtered or unexported fields
}
PaymentCustomerDelete is the builder for deleting a PaymentCustomer entity.
func (*PaymentCustomerDelete) Exec ¶
func (_d *PaymentCustomerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PaymentCustomerDelete) ExecX ¶
func (_d *PaymentCustomerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerDelete) Where ¶
func (_d *PaymentCustomerDelete) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerDelete
Where appends a list predicates to the PaymentCustomerDelete builder.
type PaymentCustomerDeleteOne ¶
type PaymentCustomerDeleteOne struct {
// contains filtered or unexported fields
}
PaymentCustomerDeleteOne is the builder for deleting a single PaymentCustomer entity.
func (*PaymentCustomerDeleteOne) Exec ¶
func (_d *PaymentCustomerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PaymentCustomerDeleteOne) ExecX ¶
func (_d *PaymentCustomerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerDeleteOne) Where ¶
func (_d *PaymentCustomerDeleteOne) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerDeleteOne
Where appends a list predicates to the PaymentCustomerDelete builder.
type PaymentCustomerEdges ¶
type PaymentCustomerEdges struct {
// User associated with this payment customer
User *User `json:"user,omitempty"`
// Payment intents for this customer
PaymentIntents []*PaymentIntent `json:"payment_intents,omitempty"`
// Subscriptions for this customer
Subscriptions []*Subscription `json:"subscriptions,omitempty"`
// Payment methods for this customer
PaymentMethods []*PaymentMethod `json:"payment_methods,omitempty"`
// contains filtered or unexported fields
}
PaymentCustomerEdges holds the relations/edges for other nodes in the graph.
func (PaymentCustomerEdges) PaymentIntentsOrErr ¶
func (e PaymentCustomerEdges) PaymentIntentsOrErr() ([]*PaymentIntent, error)
PaymentIntentsOrErr returns the PaymentIntents value or an error if the edge was not loaded in eager-loading.
func (PaymentCustomerEdges) PaymentMethodsOrErr ¶
func (e PaymentCustomerEdges) PaymentMethodsOrErr() ([]*PaymentMethod, error)
PaymentMethodsOrErr returns the PaymentMethods value or an error if the edge was not loaded in eager-loading.
func (PaymentCustomerEdges) SubscriptionsOrErr ¶
func (e PaymentCustomerEdges) SubscriptionsOrErr() ([]*Subscription, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading.
func (PaymentCustomerEdges) UserOrErr ¶
func (e PaymentCustomerEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PaymentCustomerGroupBy ¶
type PaymentCustomerGroupBy struct {
// contains filtered or unexported fields
}
PaymentCustomerGroupBy is the group-by builder for PaymentCustomer entities.
func (*PaymentCustomerGroupBy) Aggregate ¶
func (_g *PaymentCustomerGroupBy) Aggregate(fns ...AggregateFunc) *PaymentCustomerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PaymentCustomerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PaymentCustomerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerGroupBy) Scan ¶
func (_g *PaymentCustomerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentCustomerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentCustomerMutation ¶
type PaymentCustomerMutation struct {
// contains filtered or unexported fields
}
PaymentCustomerMutation represents an operation that mutates the PaymentCustomer nodes in the graph.
func (*PaymentCustomerMutation) AddField ¶
func (m *PaymentCustomerMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentCustomerMutation) AddPaymentIntentIDs ¶
func (m *PaymentCustomerMutation) AddPaymentIntentIDs(ids ...int)
AddPaymentIntentIDs adds the "payment_intents" edge to the PaymentIntent entity by ids.
func (*PaymentCustomerMutation) AddPaymentMethodIDs ¶
func (m *PaymentCustomerMutation) AddPaymentMethodIDs(ids ...int)
AddPaymentMethodIDs adds the "payment_methods" edge to the PaymentMethod entity by ids.
func (*PaymentCustomerMutation) AddSubscriptionIDs ¶
func (m *PaymentCustomerMutation) AddSubscriptionIDs(ids ...int)
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by ids.
func (*PaymentCustomerMutation) AddedEdges ¶
func (m *PaymentCustomerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PaymentCustomerMutation) AddedField ¶
func (m *PaymentCustomerMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentCustomerMutation) AddedFields ¶
func (m *PaymentCustomerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PaymentCustomerMutation) AddedIDs ¶
func (m *PaymentCustomerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PaymentCustomerMutation) ClearEdge ¶
func (m *PaymentCustomerMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PaymentCustomerMutation) ClearField ¶
func (m *PaymentCustomerMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentCustomerMutation) ClearMetadata ¶
func (m *PaymentCustomerMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*PaymentCustomerMutation) ClearName ¶
func (m *PaymentCustomerMutation) ClearName()
ClearName clears the value of the "name" field.
func (*PaymentCustomerMutation) ClearPaymentIntents ¶
func (m *PaymentCustomerMutation) ClearPaymentIntents()
ClearPaymentIntents clears the "payment_intents" edge to the PaymentIntent entity.
func (*PaymentCustomerMutation) ClearPaymentMethods ¶
func (m *PaymentCustomerMutation) ClearPaymentMethods()
ClearPaymentMethods clears the "payment_methods" edge to the PaymentMethod entity.
func (*PaymentCustomerMutation) ClearSubscriptions ¶
func (m *PaymentCustomerMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscription entity.
func (*PaymentCustomerMutation) ClearUser ¶
func (m *PaymentCustomerMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*PaymentCustomerMutation) ClearedEdges ¶
func (m *PaymentCustomerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PaymentCustomerMutation) ClearedFields ¶
func (m *PaymentCustomerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PaymentCustomerMutation) Client ¶
func (m PaymentCustomerMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PaymentCustomerMutation) CreatedAt ¶
func (m *PaymentCustomerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PaymentCustomerMutation) EdgeCleared ¶
func (m *PaymentCustomerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PaymentCustomerMutation) Email ¶
func (m *PaymentCustomerMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*PaymentCustomerMutation) Field ¶
func (m *PaymentCustomerMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentCustomerMutation) FieldCleared ¶
func (m *PaymentCustomerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PaymentCustomerMutation) Fields ¶
func (m *PaymentCustomerMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PaymentCustomerMutation) ID ¶
func (m *PaymentCustomerMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PaymentCustomerMutation) IDs ¶
func (m *PaymentCustomerMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PaymentCustomerMutation) Metadata ¶
func (m *PaymentCustomerMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*PaymentCustomerMutation) MetadataCleared ¶
func (m *PaymentCustomerMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*PaymentCustomerMutation) Name ¶
func (m *PaymentCustomerMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PaymentCustomerMutation) NameCleared ¶
func (m *PaymentCustomerMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*PaymentCustomerMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldEmail ¶
func (m *PaymentCustomerMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PaymentCustomerMutation) OldMetadata ¶
func (m *PaymentCustomerMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldName ¶
func (m *PaymentCustomerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldProvider ¶
func (m *PaymentCustomerMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldProviderCustomerID ¶
func (m *PaymentCustomerMutation) OldProviderCustomerID(ctx context.Context) (v string, err error)
OldProviderCustomerID returns the old "provider_customer_id" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PaymentCustomer entity. If the PaymentCustomer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentCustomerMutation) Op ¶
func (m *PaymentCustomerMutation) Op() Op
Op returns the operation name.
func (*PaymentCustomerMutation) PaymentIntentsCleared ¶
func (m *PaymentCustomerMutation) PaymentIntentsCleared() bool
PaymentIntentsCleared reports if the "payment_intents" edge to the PaymentIntent entity was cleared.
func (*PaymentCustomerMutation) PaymentIntentsIDs ¶
func (m *PaymentCustomerMutation) PaymentIntentsIDs() (ids []int)
PaymentIntentsIDs returns the "payment_intents" edge IDs in the mutation.
func (*PaymentCustomerMutation) PaymentMethodsCleared ¶
func (m *PaymentCustomerMutation) PaymentMethodsCleared() bool
PaymentMethodsCleared reports if the "payment_methods" edge to the PaymentMethod entity was cleared.
func (*PaymentCustomerMutation) PaymentMethodsIDs ¶
func (m *PaymentCustomerMutation) PaymentMethodsIDs() (ids []int)
PaymentMethodsIDs returns the "payment_methods" edge IDs in the mutation.
func (*PaymentCustomerMutation) Provider ¶
func (m *PaymentCustomerMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*PaymentCustomerMutation) ProviderCustomerID ¶
func (m *PaymentCustomerMutation) ProviderCustomerID() (r string, exists bool)
ProviderCustomerID returns the value of the "provider_customer_id" field in the mutation.
func (*PaymentCustomerMutation) RemovePaymentIntentIDs ¶
func (m *PaymentCustomerMutation) RemovePaymentIntentIDs(ids ...int)
RemovePaymentIntentIDs removes the "payment_intents" edge to the PaymentIntent entity by IDs.
func (*PaymentCustomerMutation) RemovePaymentMethodIDs ¶
func (m *PaymentCustomerMutation) RemovePaymentMethodIDs(ids ...int)
RemovePaymentMethodIDs removes the "payment_methods" edge to the PaymentMethod entity by IDs.
func (*PaymentCustomerMutation) RemoveSubscriptionIDs ¶
func (m *PaymentCustomerMutation) RemoveSubscriptionIDs(ids ...int)
RemoveSubscriptionIDs removes the "subscriptions" edge to the Subscription entity by IDs.
func (*PaymentCustomerMutation) RemovedEdges ¶
func (m *PaymentCustomerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PaymentCustomerMutation) RemovedIDs ¶
func (m *PaymentCustomerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PaymentCustomerMutation) RemovedPaymentIntentsIDs ¶
func (m *PaymentCustomerMutation) RemovedPaymentIntentsIDs() (ids []int)
RemovedPaymentIntents returns the removed IDs of the "payment_intents" edge to the PaymentIntent entity.
func (*PaymentCustomerMutation) RemovedPaymentMethodsIDs ¶
func (m *PaymentCustomerMutation) RemovedPaymentMethodsIDs() (ids []int)
RemovedPaymentMethods returns the removed IDs of the "payment_methods" edge to the PaymentMethod entity.
func (*PaymentCustomerMutation) RemovedSubscriptionsIDs ¶
func (m *PaymentCustomerMutation) RemovedSubscriptionsIDs() (ids []int)
RemovedSubscriptions returns the removed IDs of the "subscriptions" edge to the Subscription entity.
func (*PaymentCustomerMutation) ResetCreatedAt ¶
func (m *PaymentCustomerMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PaymentCustomerMutation) ResetEdge ¶
func (m *PaymentCustomerMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PaymentCustomerMutation) ResetEmail ¶
func (m *PaymentCustomerMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*PaymentCustomerMutation) ResetField ¶
func (m *PaymentCustomerMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentCustomerMutation) ResetMetadata ¶
func (m *PaymentCustomerMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*PaymentCustomerMutation) ResetName ¶
func (m *PaymentCustomerMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PaymentCustomerMutation) ResetPaymentIntents ¶
func (m *PaymentCustomerMutation) ResetPaymentIntents()
ResetPaymentIntents resets all changes to the "payment_intents" edge.
func (*PaymentCustomerMutation) ResetPaymentMethods ¶
func (m *PaymentCustomerMutation) ResetPaymentMethods()
ResetPaymentMethods resets all changes to the "payment_methods" edge.
func (*PaymentCustomerMutation) ResetProvider ¶
func (m *PaymentCustomerMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*PaymentCustomerMutation) ResetProviderCustomerID ¶
func (m *PaymentCustomerMutation) ResetProviderCustomerID()
ResetProviderCustomerID resets all changes to the "provider_customer_id" field.
func (*PaymentCustomerMutation) ResetSubscriptions ¶
func (m *PaymentCustomerMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*PaymentCustomerMutation) ResetUpdatedAt ¶
func (m *PaymentCustomerMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PaymentCustomerMutation) ResetUser ¶
func (m *PaymentCustomerMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*PaymentCustomerMutation) SetCreatedAt ¶
func (m *PaymentCustomerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PaymentCustomerMutation) SetEmail ¶
func (m *PaymentCustomerMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*PaymentCustomerMutation) SetField ¶
func (m *PaymentCustomerMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentCustomerMutation) SetMetadata ¶
func (m *PaymentCustomerMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*PaymentCustomerMutation) SetName ¶
func (m *PaymentCustomerMutation) SetName(s string)
SetName sets the "name" field.
func (*PaymentCustomerMutation) SetOp ¶
func (m *PaymentCustomerMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PaymentCustomerMutation) SetProvider ¶
func (m *PaymentCustomerMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*PaymentCustomerMutation) SetProviderCustomerID ¶
func (m *PaymentCustomerMutation) SetProviderCustomerID(s string)
SetProviderCustomerID sets the "provider_customer_id" field.
func (*PaymentCustomerMutation) SetUpdatedAt ¶
func (m *PaymentCustomerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PaymentCustomerMutation) SetUserID ¶
func (m *PaymentCustomerMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*PaymentCustomerMutation) SubscriptionsCleared ¶
func (m *PaymentCustomerMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscription entity was cleared.
func (*PaymentCustomerMutation) SubscriptionsIDs ¶
func (m *PaymentCustomerMutation) SubscriptionsIDs() (ids []int)
SubscriptionsIDs returns the "subscriptions" edge IDs in the mutation.
func (PaymentCustomerMutation) Tx ¶
func (m PaymentCustomerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PaymentCustomerMutation) Type ¶
func (m *PaymentCustomerMutation) Type() string
Type returns the node type of this mutation (PaymentCustomer).
func (*PaymentCustomerMutation) UpdatedAt ¶
func (m *PaymentCustomerMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PaymentCustomerMutation) UserCleared ¶
func (m *PaymentCustomerMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*PaymentCustomerMutation) UserID ¶
func (m *PaymentCustomerMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*PaymentCustomerMutation) UserIDs ¶
func (m *PaymentCustomerMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*PaymentCustomerMutation) Where ¶
func (m *PaymentCustomerMutation) Where(ps ...predicate.PaymentCustomer)
Where appends a list predicates to the PaymentCustomerMutation builder.
func (*PaymentCustomerMutation) WhereP ¶
func (m *PaymentCustomerMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PaymentCustomerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PaymentCustomerQuery ¶
type PaymentCustomerQuery struct {
// contains filtered or unexported fields
}
PaymentCustomerQuery is the builder for querying PaymentCustomer entities.
func (*PaymentCustomerQuery) Aggregate ¶
func (_q *PaymentCustomerQuery) Aggregate(fns ...AggregateFunc) *PaymentCustomerSelect
Aggregate returns a PaymentCustomerSelect configured with the given aggregations.
func (*PaymentCustomerQuery) All ¶
func (_q *PaymentCustomerQuery) All(ctx context.Context) ([]*PaymentCustomer, error)
All executes the query and returns a list of PaymentCustomers.
func (*PaymentCustomerQuery) AllX ¶
func (_q *PaymentCustomerQuery) AllX(ctx context.Context) []*PaymentCustomer
AllX is like All, but panics if an error occurs.
func (*PaymentCustomerQuery) Clone ¶
func (_q *PaymentCustomerQuery) Clone() *PaymentCustomerQuery
Clone returns a duplicate of the PaymentCustomerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PaymentCustomerQuery) Count ¶
func (_q *PaymentCustomerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PaymentCustomerQuery) CountX ¶
func (_q *PaymentCustomerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PaymentCustomerQuery) Exist ¶
func (_q *PaymentCustomerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PaymentCustomerQuery) ExistX ¶
func (_q *PaymentCustomerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PaymentCustomerQuery) First ¶
func (_q *PaymentCustomerQuery) First(ctx context.Context) (*PaymentCustomer, error)
First returns the first PaymentCustomer entity from the query. Returns a *NotFoundError when no PaymentCustomer was found.
func (*PaymentCustomerQuery) FirstID ¶
func (_q *PaymentCustomerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PaymentCustomer ID from the query. Returns a *NotFoundError when no PaymentCustomer ID was found.
func (*PaymentCustomerQuery) FirstIDX ¶
func (_q *PaymentCustomerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PaymentCustomerQuery) FirstX ¶
func (_q *PaymentCustomerQuery) FirstX(ctx context.Context) *PaymentCustomer
FirstX is like First, but panics if an error occurs.
func (*PaymentCustomerQuery) GroupBy ¶
func (_q *PaymentCustomerQuery) GroupBy(field string, fields ...string) *PaymentCustomerGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
ProviderCustomerID string `json:"provider_customer_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.PaymentCustomer.Query().
GroupBy(paymentcustomer.FieldProviderCustomerID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PaymentCustomerQuery) IDs ¶
func (_q *PaymentCustomerQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PaymentCustomer IDs.
func (*PaymentCustomerQuery) IDsX ¶
func (_q *PaymentCustomerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PaymentCustomerQuery) Limit ¶
func (_q *PaymentCustomerQuery) Limit(limit int) *PaymentCustomerQuery
Limit the number of records to be returned by this query.
func (*PaymentCustomerQuery) Offset ¶
func (_q *PaymentCustomerQuery) Offset(offset int) *PaymentCustomerQuery
Offset to start from.
func (*PaymentCustomerQuery) Only ¶
func (_q *PaymentCustomerQuery) Only(ctx context.Context) (*PaymentCustomer, error)
Only returns a single PaymentCustomer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PaymentCustomer entity is found. Returns a *NotFoundError when no PaymentCustomer entities are found.
func (*PaymentCustomerQuery) OnlyID ¶
func (_q *PaymentCustomerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PaymentCustomer ID in the query. Returns a *NotSingularError when more than one PaymentCustomer ID is found. Returns a *NotFoundError when no entities are found.
func (*PaymentCustomerQuery) OnlyIDX ¶
func (_q *PaymentCustomerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PaymentCustomerQuery) OnlyX ¶
func (_q *PaymentCustomerQuery) OnlyX(ctx context.Context) *PaymentCustomer
OnlyX is like Only, but panics if an error occurs.
func (*PaymentCustomerQuery) Order ¶
func (_q *PaymentCustomerQuery) Order(o ...paymentcustomer.OrderOption) *PaymentCustomerQuery
Order specifies how the records should be ordered.
func (*PaymentCustomerQuery) QueryPaymentIntents ¶
func (_q *PaymentCustomerQuery) QueryPaymentIntents() *PaymentIntentQuery
QueryPaymentIntents chains the current query on the "payment_intents" edge.
func (*PaymentCustomerQuery) QueryPaymentMethods ¶
func (_q *PaymentCustomerQuery) QueryPaymentMethods() *PaymentMethodQuery
QueryPaymentMethods chains the current query on the "payment_methods" edge.
func (*PaymentCustomerQuery) QuerySubscriptions ¶
func (_q *PaymentCustomerQuery) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions chains the current query on the "subscriptions" edge.
func (*PaymentCustomerQuery) QueryUser ¶
func (_q *PaymentCustomerQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*PaymentCustomerQuery) Select ¶
func (_q *PaymentCustomerQuery) Select(fields ...string) *PaymentCustomerSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
ProviderCustomerID string `json:"provider_customer_id,omitempty"`
}
client.PaymentCustomer.Query().
Select(paymentcustomer.FieldProviderCustomerID).
Scan(ctx, &v)
func (*PaymentCustomerQuery) Unique ¶
func (_q *PaymentCustomerQuery) Unique(unique bool) *PaymentCustomerQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PaymentCustomerQuery) Where ¶
func (_q *PaymentCustomerQuery) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerQuery
Where adds a new predicate for the PaymentCustomerQuery builder.
func (*PaymentCustomerQuery) WithPaymentIntents ¶
func (_q *PaymentCustomerQuery) WithPaymentIntents(opts ...func(*PaymentIntentQuery)) *PaymentCustomerQuery
WithPaymentIntents tells the query-builder to eager-load the nodes that are connected to the "payment_intents" edge. The optional arguments are used to configure the query builder of the edge.
func (*PaymentCustomerQuery) WithPaymentMethods ¶
func (_q *PaymentCustomerQuery) WithPaymentMethods(opts ...func(*PaymentMethodQuery)) *PaymentCustomerQuery
WithPaymentMethods tells the query-builder to eager-load the nodes that are connected to the "payment_methods" edge. The optional arguments are used to configure the query builder of the edge.
func (*PaymentCustomerQuery) WithSubscriptions ¶
func (_q *PaymentCustomerQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *PaymentCustomerQuery
WithSubscriptions tells the query-builder to eager-load the nodes that are connected to the "subscriptions" edge. The optional arguments are used to configure the query builder of the edge.
func (*PaymentCustomerQuery) WithUser ¶
func (_q *PaymentCustomerQuery) WithUser(opts ...func(*UserQuery)) *PaymentCustomerQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type PaymentCustomerSelect ¶
type PaymentCustomerSelect struct {
*PaymentCustomerQuery
// contains filtered or unexported fields
}
PaymentCustomerSelect is the builder for selecting fields of PaymentCustomer entities.
func (*PaymentCustomerSelect) Aggregate ¶
func (_s *PaymentCustomerSelect) Aggregate(fns ...AggregateFunc) *PaymentCustomerSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PaymentCustomerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PaymentCustomerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentCustomerSelect) Scan ¶
func (_s *PaymentCustomerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentCustomerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentCustomerUpdate ¶
type PaymentCustomerUpdate struct {
// contains filtered or unexported fields
}
PaymentCustomerUpdate is the builder for updating PaymentCustomer entities.
func (*PaymentCustomerUpdate) AddPaymentIntentIDs ¶
func (_u *PaymentCustomerUpdate) AddPaymentIntentIDs(ids ...int) *PaymentCustomerUpdate
AddPaymentIntentIDs adds the "payment_intents" edge to the PaymentIntent entity by IDs.
func (*PaymentCustomerUpdate) AddPaymentIntents ¶
func (_u *PaymentCustomerUpdate) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdate
AddPaymentIntents adds the "payment_intents" edges to the PaymentIntent entity.
func (*PaymentCustomerUpdate) AddPaymentMethodIDs ¶
func (_u *PaymentCustomerUpdate) AddPaymentMethodIDs(ids ...int) *PaymentCustomerUpdate
AddPaymentMethodIDs adds the "payment_methods" edge to the PaymentMethod entity by IDs.
func (*PaymentCustomerUpdate) AddPaymentMethods ¶
func (_u *PaymentCustomerUpdate) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdate
AddPaymentMethods adds the "payment_methods" edges to the PaymentMethod entity.
func (*PaymentCustomerUpdate) AddSubscriptionIDs ¶
func (_u *PaymentCustomerUpdate) AddSubscriptionIDs(ids ...int) *PaymentCustomerUpdate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*PaymentCustomerUpdate) AddSubscriptions ¶
func (_u *PaymentCustomerUpdate) AddSubscriptions(v ...*Subscription) *PaymentCustomerUpdate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*PaymentCustomerUpdate) ClearMetadata ¶
func (_u *PaymentCustomerUpdate) ClearMetadata() *PaymentCustomerUpdate
ClearMetadata clears the value of the "metadata" field.
func (*PaymentCustomerUpdate) ClearName ¶
func (_u *PaymentCustomerUpdate) ClearName() *PaymentCustomerUpdate
ClearName clears the value of the "name" field.
func (*PaymentCustomerUpdate) ClearPaymentIntents ¶
func (_u *PaymentCustomerUpdate) ClearPaymentIntents() *PaymentCustomerUpdate
ClearPaymentIntents clears all "payment_intents" edges to the PaymentIntent entity.
func (*PaymentCustomerUpdate) ClearPaymentMethods ¶
func (_u *PaymentCustomerUpdate) ClearPaymentMethods() *PaymentCustomerUpdate
ClearPaymentMethods clears all "payment_methods" edges to the PaymentMethod entity.
func (*PaymentCustomerUpdate) ClearSubscriptions ¶
func (_u *PaymentCustomerUpdate) ClearSubscriptions() *PaymentCustomerUpdate
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*PaymentCustomerUpdate) ClearUser ¶
func (_u *PaymentCustomerUpdate) ClearUser() *PaymentCustomerUpdate
ClearUser clears the "user" edge to the User entity.
func (*PaymentCustomerUpdate) Exec ¶
func (_u *PaymentCustomerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentCustomerUpdate) ExecX ¶
func (_u *PaymentCustomerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerUpdate) Mutation ¶
func (_u *PaymentCustomerUpdate) Mutation() *PaymentCustomerMutation
Mutation returns the PaymentCustomerMutation object of the builder.
func (*PaymentCustomerUpdate) RemovePaymentIntentIDs ¶
func (_u *PaymentCustomerUpdate) RemovePaymentIntentIDs(ids ...int) *PaymentCustomerUpdate
RemovePaymentIntentIDs removes the "payment_intents" edge to PaymentIntent entities by IDs.
func (*PaymentCustomerUpdate) RemovePaymentIntents ¶
func (_u *PaymentCustomerUpdate) RemovePaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdate
RemovePaymentIntents removes "payment_intents" edges to PaymentIntent entities.
func (*PaymentCustomerUpdate) RemovePaymentMethodIDs ¶
func (_u *PaymentCustomerUpdate) RemovePaymentMethodIDs(ids ...int) *PaymentCustomerUpdate
RemovePaymentMethodIDs removes the "payment_methods" edge to PaymentMethod entities by IDs.
func (*PaymentCustomerUpdate) RemovePaymentMethods ¶
func (_u *PaymentCustomerUpdate) RemovePaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdate
RemovePaymentMethods removes "payment_methods" edges to PaymentMethod entities.
func (*PaymentCustomerUpdate) RemoveSubscriptionIDs ¶
func (_u *PaymentCustomerUpdate) RemoveSubscriptionIDs(ids ...int) *PaymentCustomerUpdate
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*PaymentCustomerUpdate) RemoveSubscriptions ¶
func (_u *PaymentCustomerUpdate) RemoveSubscriptions(v ...*Subscription) *PaymentCustomerUpdate
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*PaymentCustomerUpdate) Save ¶
func (_u *PaymentCustomerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PaymentCustomerUpdate) SaveX ¶
func (_u *PaymentCustomerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PaymentCustomerUpdate) SetEmail ¶
func (_u *PaymentCustomerUpdate) SetEmail(v string) *PaymentCustomerUpdate
SetEmail sets the "email" field.
func (*PaymentCustomerUpdate) SetMetadata ¶
func (_u *PaymentCustomerUpdate) SetMetadata(v map[string]interface{}) *PaymentCustomerUpdate
SetMetadata sets the "metadata" field.
func (*PaymentCustomerUpdate) SetName ¶
func (_u *PaymentCustomerUpdate) SetName(v string) *PaymentCustomerUpdate
SetName sets the "name" field.
func (*PaymentCustomerUpdate) SetNillableEmail ¶
func (_u *PaymentCustomerUpdate) SetNillableEmail(v *string) *PaymentCustomerUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PaymentCustomerUpdate) SetNillableName ¶
func (_u *PaymentCustomerUpdate) SetNillableName(v *string) *PaymentCustomerUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PaymentCustomerUpdate) SetNillableProvider ¶
func (_u *PaymentCustomerUpdate) SetNillableProvider(v *string) *PaymentCustomerUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentCustomerUpdate) SetNillableProviderCustomerID ¶
func (_u *PaymentCustomerUpdate) SetNillableProviderCustomerID(v *string) *PaymentCustomerUpdate
SetNillableProviderCustomerID sets the "provider_customer_id" field if the given value is not nil.
func (*PaymentCustomerUpdate) SetProvider ¶
func (_u *PaymentCustomerUpdate) SetProvider(v string) *PaymentCustomerUpdate
SetProvider sets the "provider" field.
func (*PaymentCustomerUpdate) SetProviderCustomerID ¶
func (_u *PaymentCustomerUpdate) SetProviderCustomerID(v string) *PaymentCustomerUpdate
SetProviderCustomerID sets the "provider_customer_id" field.
func (*PaymentCustomerUpdate) SetUpdatedAt ¶
func (_u *PaymentCustomerUpdate) SetUpdatedAt(v time.Time) *PaymentCustomerUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentCustomerUpdate) SetUser ¶
func (_u *PaymentCustomerUpdate) SetUser(v *User) *PaymentCustomerUpdate
SetUser sets the "user" edge to the User entity.
func (*PaymentCustomerUpdate) SetUserID ¶
func (_u *PaymentCustomerUpdate) SetUserID(id int) *PaymentCustomerUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*PaymentCustomerUpdate) Where ¶
func (_u *PaymentCustomerUpdate) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerUpdate
Where appends a list predicates to the PaymentCustomerUpdate builder.
type PaymentCustomerUpdateOne ¶
type PaymentCustomerUpdateOne struct {
// contains filtered or unexported fields
}
PaymentCustomerUpdateOne is the builder for updating a single PaymentCustomer entity.
func (*PaymentCustomerUpdateOne) AddPaymentIntentIDs ¶
func (_u *PaymentCustomerUpdateOne) AddPaymentIntentIDs(ids ...int) *PaymentCustomerUpdateOne
AddPaymentIntentIDs adds the "payment_intents" edge to the PaymentIntent entity by IDs.
func (*PaymentCustomerUpdateOne) AddPaymentIntents ¶
func (_u *PaymentCustomerUpdateOne) AddPaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdateOne
AddPaymentIntents adds the "payment_intents" edges to the PaymentIntent entity.
func (*PaymentCustomerUpdateOne) AddPaymentMethodIDs ¶
func (_u *PaymentCustomerUpdateOne) AddPaymentMethodIDs(ids ...int) *PaymentCustomerUpdateOne
AddPaymentMethodIDs adds the "payment_methods" edge to the PaymentMethod entity by IDs.
func (*PaymentCustomerUpdateOne) AddPaymentMethods ¶
func (_u *PaymentCustomerUpdateOne) AddPaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdateOne
AddPaymentMethods adds the "payment_methods" edges to the PaymentMethod entity.
func (*PaymentCustomerUpdateOne) AddSubscriptionIDs ¶
func (_u *PaymentCustomerUpdateOne) AddSubscriptionIDs(ids ...int) *PaymentCustomerUpdateOne
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*PaymentCustomerUpdateOne) AddSubscriptions ¶
func (_u *PaymentCustomerUpdateOne) AddSubscriptions(v ...*Subscription) *PaymentCustomerUpdateOne
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*PaymentCustomerUpdateOne) ClearMetadata ¶
func (_u *PaymentCustomerUpdateOne) ClearMetadata() *PaymentCustomerUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*PaymentCustomerUpdateOne) ClearName ¶
func (_u *PaymentCustomerUpdateOne) ClearName() *PaymentCustomerUpdateOne
ClearName clears the value of the "name" field.
func (*PaymentCustomerUpdateOne) ClearPaymentIntents ¶
func (_u *PaymentCustomerUpdateOne) ClearPaymentIntents() *PaymentCustomerUpdateOne
ClearPaymentIntents clears all "payment_intents" edges to the PaymentIntent entity.
func (*PaymentCustomerUpdateOne) ClearPaymentMethods ¶
func (_u *PaymentCustomerUpdateOne) ClearPaymentMethods() *PaymentCustomerUpdateOne
ClearPaymentMethods clears all "payment_methods" edges to the PaymentMethod entity.
func (*PaymentCustomerUpdateOne) ClearSubscriptions ¶
func (_u *PaymentCustomerUpdateOne) ClearSubscriptions() *PaymentCustomerUpdateOne
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*PaymentCustomerUpdateOne) ClearUser ¶
func (_u *PaymentCustomerUpdateOne) ClearUser() *PaymentCustomerUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*PaymentCustomerUpdateOne) Exec ¶
func (_u *PaymentCustomerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PaymentCustomerUpdateOne) ExecX ¶
func (_u *PaymentCustomerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentCustomerUpdateOne) Mutation ¶
func (_u *PaymentCustomerUpdateOne) Mutation() *PaymentCustomerMutation
Mutation returns the PaymentCustomerMutation object of the builder.
func (*PaymentCustomerUpdateOne) RemovePaymentIntentIDs ¶
func (_u *PaymentCustomerUpdateOne) RemovePaymentIntentIDs(ids ...int) *PaymentCustomerUpdateOne
RemovePaymentIntentIDs removes the "payment_intents" edge to PaymentIntent entities by IDs.
func (*PaymentCustomerUpdateOne) RemovePaymentIntents ¶
func (_u *PaymentCustomerUpdateOne) RemovePaymentIntents(v ...*PaymentIntent) *PaymentCustomerUpdateOne
RemovePaymentIntents removes "payment_intents" edges to PaymentIntent entities.
func (*PaymentCustomerUpdateOne) RemovePaymentMethodIDs ¶
func (_u *PaymentCustomerUpdateOne) RemovePaymentMethodIDs(ids ...int) *PaymentCustomerUpdateOne
RemovePaymentMethodIDs removes the "payment_methods" edge to PaymentMethod entities by IDs.
func (*PaymentCustomerUpdateOne) RemovePaymentMethods ¶
func (_u *PaymentCustomerUpdateOne) RemovePaymentMethods(v ...*PaymentMethod) *PaymentCustomerUpdateOne
RemovePaymentMethods removes "payment_methods" edges to PaymentMethod entities.
func (*PaymentCustomerUpdateOne) RemoveSubscriptionIDs ¶
func (_u *PaymentCustomerUpdateOne) RemoveSubscriptionIDs(ids ...int) *PaymentCustomerUpdateOne
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*PaymentCustomerUpdateOne) RemoveSubscriptions ¶
func (_u *PaymentCustomerUpdateOne) RemoveSubscriptions(v ...*Subscription) *PaymentCustomerUpdateOne
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*PaymentCustomerUpdateOne) Save ¶
func (_u *PaymentCustomerUpdateOne) Save(ctx context.Context) (*PaymentCustomer, error)
Save executes the query and returns the updated PaymentCustomer entity.
func (*PaymentCustomerUpdateOne) SaveX ¶
func (_u *PaymentCustomerUpdateOne) SaveX(ctx context.Context) *PaymentCustomer
SaveX is like Save, but panics if an error occurs.
func (*PaymentCustomerUpdateOne) Select ¶
func (_u *PaymentCustomerUpdateOne) Select(field string, fields ...string) *PaymentCustomerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PaymentCustomerUpdateOne) SetEmail ¶
func (_u *PaymentCustomerUpdateOne) SetEmail(v string) *PaymentCustomerUpdateOne
SetEmail sets the "email" field.
func (*PaymentCustomerUpdateOne) SetMetadata ¶
func (_u *PaymentCustomerUpdateOne) SetMetadata(v map[string]interface{}) *PaymentCustomerUpdateOne
SetMetadata sets the "metadata" field.
func (*PaymentCustomerUpdateOne) SetName ¶
func (_u *PaymentCustomerUpdateOne) SetName(v string) *PaymentCustomerUpdateOne
SetName sets the "name" field.
func (*PaymentCustomerUpdateOne) SetNillableEmail ¶
func (_u *PaymentCustomerUpdateOne) SetNillableEmail(v *string) *PaymentCustomerUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PaymentCustomerUpdateOne) SetNillableName ¶
func (_u *PaymentCustomerUpdateOne) SetNillableName(v *string) *PaymentCustomerUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PaymentCustomerUpdateOne) SetNillableProvider ¶
func (_u *PaymentCustomerUpdateOne) SetNillableProvider(v *string) *PaymentCustomerUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentCustomerUpdateOne) SetNillableProviderCustomerID ¶
func (_u *PaymentCustomerUpdateOne) SetNillableProviderCustomerID(v *string) *PaymentCustomerUpdateOne
SetNillableProviderCustomerID sets the "provider_customer_id" field if the given value is not nil.
func (*PaymentCustomerUpdateOne) SetProvider ¶
func (_u *PaymentCustomerUpdateOne) SetProvider(v string) *PaymentCustomerUpdateOne
SetProvider sets the "provider" field.
func (*PaymentCustomerUpdateOne) SetProviderCustomerID ¶
func (_u *PaymentCustomerUpdateOne) SetProviderCustomerID(v string) *PaymentCustomerUpdateOne
SetProviderCustomerID sets the "provider_customer_id" field.
func (*PaymentCustomerUpdateOne) SetUpdatedAt ¶
func (_u *PaymentCustomerUpdateOne) SetUpdatedAt(v time.Time) *PaymentCustomerUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentCustomerUpdateOne) SetUser ¶
func (_u *PaymentCustomerUpdateOne) SetUser(v *User) *PaymentCustomerUpdateOne
SetUser sets the "user" edge to the User entity.
func (*PaymentCustomerUpdateOne) SetUserID ¶
func (_u *PaymentCustomerUpdateOne) SetUserID(id int) *PaymentCustomerUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*PaymentCustomerUpdateOne) Where ¶
func (_u *PaymentCustomerUpdateOne) Where(ps ...predicate.PaymentCustomer) *PaymentCustomerUpdateOne
Where appends a list predicates to the PaymentCustomerUpdate builder.
type PaymentCustomers ¶
type PaymentCustomers []*PaymentCustomer
PaymentCustomers is a parsable slice of PaymentCustomer.
type PaymentIntent ¶
type PaymentIntent struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// External payment provider payment intent ID
ProviderPaymentIntentID string `json:"provider_payment_intent_id,omitempty"`
// Payment provider name
Provider string `json:"provider,omitempty"`
// Payment intent status from provider
Status paymentintent.Status `json:"status,omitempty"`
// Amount in smallest currency unit (e.g., cents)
Amount int64 `json:"amount,omitempty"`
// Three-letter ISO currency code
Currency string `json:"currency,omitempty"`
// Description of the payment
Description string `json:"description,omitempty"`
// Client secret for frontend payment processing
ClientSecret string `json:"-"`
// Additional payment data
Metadata map[string]interface{} `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PaymentIntentQuery when eager-loading is set.
Edges PaymentIntentEdges `json:"edges"`
// contains filtered or unexported fields
}
PaymentIntent is the model entity for the PaymentIntent schema.
func (*PaymentIntent) QueryCustomer ¶
func (_m *PaymentIntent) QueryCustomer() *PaymentCustomerQuery
QueryCustomer queries the "customer" edge of the PaymentIntent entity.
func (*PaymentIntent) String ¶
func (_m *PaymentIntent) String() string
String implements the fmt.Stringer.
func (*PaymentIntent) Unwrap ¶
func (_m *PaymentIntent) Unwrap() *PaymentIntent
Unwrap unwraps the PaymentIntent entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*PaymentIntent) Update ¶
func (_m *PaymentIntent) Update() *PaymentIntentUpdateOne
Update returns a builder for updating this PaymentIntent. Note that you need to call PaymentIntent.Unwrap() before calling this method if this PaymentIntent was returned from a transaction, and the transaction was committed or rolled back.
type PaymentIntentClient ¶
type PaymentIntentClient struct {
// contains filtered or unexported fields
}
PaymentIntentClient is a client for the PaymentIntent schema.
func NewPaymentIntentClient ¶
func NewPaymentIntentClient(c config) *PaymentIntentClient
NewPaymentIntentClient returns a client for the PaymentIntent from the given config.
func (*PaymentIntentClient) Create ¶
func (c *PaymentIntentClient) Create() *PaymentIntentCreate
Create returns a builder for creating a PaymentIntent entity.
func (*PaymentIntentClient) CreateBulk ¶
func (c *PaymentIntentClient) CreateBulk(builders ...*PaymentIntentCreate) *PaymentIntentCreateBulk
CreateBulk returns a builder for creating a bulk of PaymentIntent entities.
func (*PaymentIntentClient) Delete ¶
func (c *PaymentIntentClient) Delete() *PaymentIntentDelete
Delete returns a delete builder for PaymentIntent.
func (*PaymentIntentClient) DeleteOne ¶
func (c *PaymentIntentClient) DeleteOne(_m *PaymentIntent) *PaymentIntentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PaymentIntentClient) DeleteOneID ¶
func (c *PaymentIntentClient) DeleteOneID(id int) *PaymentIntentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PaymentIntentClient) Get ¶
func (c *PaymentIntentClient) Get(ctx context.Context, id int) (*PaymentIntent, error)
Get returns a PaymentIntent entity by its id.
func (*PaymentIntentClient) GetX ¶
func (c *PaymentIntentClient) GetX(ctx context.Context, id int) *PaymentIntent
GetX is like Get, but panics if an error occurs.
func (*PaymentIntentClient) Hooks ¶
func (c *PaymentIntentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PaymentIntentClient) Intercept ¶
func (c *PaymentIntentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `paymentintent.Intercept(f(g(h())))`.
func (*PaymentIntentClient) Interceptors ¶
func (c *PaymentIntentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PaymentIntentClient) MapCreateBulk ¶
func (c *PaymentIntentClient) MapCreateBulk(slice any, setFunc func(*PaymentIntentCreate, int)) *PaymentIntentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PaymentIntentClient) Query ¶
func (c *PaymentIntentClient) Query() *PaymentIntentQuery
Query returns a query builder for PaymentIntent.
func (*PaymentIntentClient) QueryCustomer ¶
func (c *PaymentIntentClient) QueryCustomer(_m *PaymentIntent) *PaymentCustomerQuery
QueryCustomer queries the customer edge of a PaymentIntent.
func (*PaymentIntentClient) Update ¶
func (c *PaymentIntentClient) Update() *PaymentIntentUpdate
Update returns an update builder for PaymentIntent.
func (*PaymentIntentClient) UpdateOne ¶
func (c *PaymentIntentClient) UpdateOne(_m *PaymentIntent) *PaymentIntentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PaymentIntentClient) UpdateOneID ¶
func (c *PaymentIntentClient) UpdateOneID(id int) *PaymentIntentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PaymentIntentClient) Use ¶
func (c *PaymentIntentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `paymentintent.Hooks(f(g(h())))`.
type PaymentIntentCreate ¶
type PaymentIntentCreate struct {
// contains filtered or unexported fields
}
PaymentIntentCreate is the builder for creating a PaymentIntent entity.
func (*PaymentIntentCreate) Exec ¶
func (_c *PaymentIntentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentIntentCreate) ExecX ¶
func (_c *PaymentIntentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentCreate) Mutation ¶
func (_c *PaymentIntentCreate) Mutation() *PaymentIntentMutation
Mutation returns the PaymentIntentMutation object of the builder.
func (*PaymentIntentCreate) Save ¶
func (_c *PaymentIntentCreate) Save(ctx context.Context) (*PaymentIntent, error)
Save creates the PaymentIntent in the database.
func (*PaymentIntentCreate) SaveX ¶
func (_c *PaymentIntentCreate) SaveX(ctx context.Context) *PaymentIntent
SaveX calls Save and panics if Save returns an error.
func (*PaymentIntentCreate) SetAmount ¶
func (_c *PaymentIntentCreate) SetAmount(v int64) *PaymentIntentCreate
SetAmount sets the "amount" field.
func (*PaymentIntentCreate) SetClientSecret ¶
func (_c *PaymentIntentCreate) SetClientSecret(v string) *PaymentIntentCreate
SetClientSecret sets the "client_secret" field.
func (*PaymentIntentCreate) SetCreatedAt ¶
func (_c *PaymentIntentCreate) SetCreatedAt(v time.Time) *PaymentIntentCreate
SetCreatedAt sets the "created_at" field.
func (*PaymentIntentCreate) SetCurrency ¶
func (_c *PaymentIntentCreate) SetCurrency(v string) *PaymentIntentCreate
SetCurrency sets the "currency" field.
func (*PaymentIntentCreate) SetCustomer ¶
func (_c *PaymentIntentCreate) SetCustomer(v *PaymentCustomer) *PaymentIntentCreate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentCreate) SetCustomerID ¶
func (_c *PaymentIntentCreate) SetCustomerID(id int) *PaymentIntentCreate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentIntentCreate) SetDescription ¶
func (_c *PaymentIntentCreate) SetDescription(v string) *PaymentIntentCreate
SetDescription sets the "description" field.
func (*PaymentIntentCreate) SetMetadata ¶
func (_c *PaymentIntentCreate) SetMetadata(v map[string]interface{}) *PaymentIntentCreate
SetMetadata sets the "metadata" field.
func (*PaymentIntentCreate) SetNillableClientSecret ¶
func (_c *PaymentIntentCreate) SetNillableClientSecret(v *string) *PaymentIntentCreate
SetNillableClientSecret sets the "client_secret" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableCreatedAt ¶
func (_c *PaymentIntentCreate) SetNillableCreatedAt(v *time.Time) *PaymentIntentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableCurrency ¶
func (_c *PaymentIntentCreate) SetNillableCurrency(v *string) *PaymentIntentCreate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableDescription ¶
func (_c *PaymentIntentCreate) SetNillableDescription(v *string) *PaymentIntentCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableProvider ¶
func (_c *PaymentIntentCreate) SetNillableProvider(v *string) *PaymentIntentCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableStatus ¶
func (_c *PaymentIntentCreate) SetNillableStatus(v *paymentintent.Status) *PaymentIntentCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentIntentCreate) SetNillableUpdatedAt ¶
func (_c *PaymentIntentCreate) SetNillableUpdatedAt(v *time.Time) *PaymentIntentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PaymentIntentCreate) SetProvider ¶
func (_c *PaymentIntentCreate) SetProvider(v string) *PaymentIntentCreate
SetProvider sets the "provider" field.
func (*PaymentIntentCreate) SetProviderPaymentIntentID ¶
func (_c *PaymentIntentCreate) SetProviderPaymentIntentID(v string) *PaymentIntentCreate
SetProviderPaymentIntentID sets the "provider_payment_intent_id" field.
func (*PaymentIntentCreate) SetStatus ¶
func (_c *PaymentIntentCreate) SetStatus(v paymentintent.Status) *PaymentIntentCreate
SetStatus sets the "status" field.
func (*PaymentIntentCreate) SetUpdatedAt ¶
func (_c *PaymentIntentCreate) SetUpdatedAt(v time.Time) *PaymentIntentCreate
SetUpdatedAt sets the "updated_at" field.
type PaymentIntentCreateBulk ¶
type PaymentIntentCreateBulk struct {
// contains filtered or unexported fields
}
PaymentIntentCreateBulk is the builder for creating many PaymentIntent entities in bulk.
func (*PaymentIntentCreateBulk) Exec ¶
func (_c *PaymentIntentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentIntentCreateBulk) ExecX ¶
func (_c *PaymentIntentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentCreateBulk) Save ¶
func (_c *PaymentIntentCreateBulk) Save(ctx context.Context) ([]*PaymentIntent, error)
Save creates the PaymentIntent entities in the database.
func (*PaymentIntentCreateBulk) SaveX ¶
func (_c *PaymentIntentCreateBulk) SaveX(ctx context.Context) []*PaymentIntent
SaveX is like Save, but panics if an error occurs.
type PaymentIntentDelete ¶
type PaymentIntentDelete struct {
// contains filtered or unexported fields
}
PaymentIntentDelete is the builder for deleting a PaymentIntent entity.
func (*PaymentIntentDelete) Exec ¶
func (_d *PaymentIntentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PaymentIntentDelete) ExecX ¶
func (_d *PaymentIntentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentDelete) Where ¶
func (_d *PaymentIntentDelete) Where(ps ...predicate.PaymentIntent) *PaymentIntentDelete
Where appends a list predicates to the PaymentIntentDelete builder.
type PaymentIntentDeleteOne ¶
type PaymentIntentDeleteOne struct {
// contains filtered or unexported fields
}
PaymentIntentDeleteOne is the builder for deleting a single PaymentIntent entity.
func (*PaymentIntentDeleteOne) Exec ¶
func (_d *PaymentIntentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PaymentIntentDeleteOne) ExecX ¶
func (_d *PaymentIntentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentDeleteOne) Where ¶
func (_d *PaymentIntentDeleteOne) Where(ps ...predicate.PaymentIntent) *PaymentIntentDeleteOne
Where appends a list predicates to the PaymentIntentDelete builder.
type PaymentIntentEdges ¶
type PaymentIntentEdges struct {
// Payment customer who owns this payment intent
Customer *PaymentCustomer `json:"customer,omitempty"`
// contains filtered or unexported fields
}
PaymentIntentEdges holds the relations/edges for other nodes in the graph.
func (PaymentIntentEdges) CustomerOrErr ¶
func (e PaymentIntentEdges) CustomerOrErr() (*PaymentCustomer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PaymentIntentGroupBy ¶
type PaymentIntentGroupBy struct {
// contains filtered or unexported fields
}
PaymentIntentGroupBy is the group-by builder for PaymentIntent entities.
func (*PaymentIntentGroupBy) Aggregate ¶
func (_g *PaymentIntentGroupBy) Aggregate(fns ...AggregateFunc) *PaymentIntentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PaymentIntentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentIntentGroupBy) Scan ¶
func (_g *PaymentIntentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentIntentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentIntentMutation ¶
type PaymentIntentMutation struct {
// contains filtered or unexported fields
}
PaymentIntentMutation represents an operation that mutates the PaymentIntent nodes in the graph.
func (*PaymentIntentMutation) AddAmount ¶
func (m *PaymentIntentMutation) AddAmount(i int64)
AddAmount adds i to the "amount" field.
func (*PaymentIntentMutation) AddField ¶
func (m *PaymentIntentMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentIntentMutation) AddedAmount ¶
func (m *PaymentIntentMutation) AddedAmount() (r int64, exists bool)
AddedAmount returns the value that was added to the "amount" field in this mutation.
func (*PaymentIntentMutation) AddedEdges ¶
func (m *PaymentIntentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PaymentIntentMutation) AddedField ¶
func (m *PaymentIntentMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentIntentMutation) AddedFields ¶
func (m *PaymentIntentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PaymentIntentMutation) AddedIDs ¶
func (m *PaymentIntentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PaymentIntentMutation) Amount ¶
func (m *PaymentIntentMutation) Amount() (r int64, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*PaymentIntentMutation) ClearClientSecret ¶
func (m *PaymentIntentMutation) ClearClientSecret()
ClearClientSecret clears the value of the "client_secret" field.
func (*PaymentIntentMutation) ClearCustomer ¶
func (m *PaymentIntentMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentMutation) ClearDescription ¶
func (m *PaymentIntentMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*PaymentIntentMutation) ClearEdge ¶
func (m *PaymentIntentMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PaymentIntentMutation) ClearField ¶
func (m *PaymentIntentMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentIntentMutation) ClearMetadata ¶
func (m *PaymentIntentMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*PaymentIntentMutation) ClearedEdges ¶
func (m *PaymentIntentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PaymentIntentMutation) ClearedFields ¶
func (m *PaymentIntentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PaymentIntentMutation) Client ¶
func (m PaymentIntentMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PaymentIntentMutation) ClientSecret ¶
func (m *PaymentIntentMutation) ClientSecret() (r string, exists bool)
ClientSecret returns the value of the "client_secret" field in the mutation.
func (*PaymentIntentMutation) ClientSecretCleared ¶
func (m *PaymentIntentMutation) ClientSecretCleared() bool
ClientSecretCleared returns if the "client_secret" field was cleared in this mutation.
func (*PaymentIntentMutation) CreatedAt ¶
func (m *PaymentIntentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PaymentIntentMutation) Currency ¶
func (m *PaymentIntentMutation) Currency() (r string, exists bool)
Currency returns the value of the "currency" field in the mutation.
func (*PaymentIntentMutation) CustomerCleared ¶
func (m *PaymentIntentMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the PaymentCustomer entity was cleared.
func (*PaymentIntentMutation) CustomerID ¶
func (m *PaymentIntentMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*PaymentIntentMutation) CustomerIDs ¶
func (m *PaymentIntentMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*PaymentIntentMutation) Description ¶
func (m *PaymentIntentMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*PaymentIntentMutation) DescriptionCleared ¶
func (m *PaymentIntentMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*PaymentIntentMutation) EdgeCleared ¶
func (m *PaymentIntentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PaymentIntentMutation) Field ¶
func (m *PaymentIntentMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentIntentMutation) FieldCleared ¶
func (m *PaymentIntentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PaymentIntentMutation) Fields ¶
func (m *PaymentIntentMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PaymentIntentMutation) ID ¶
func (m *PaymentIntentMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PaymentIntentMutation) IDs ¶
func (m *PaymentIntentMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PaymentIntentMutation) Metadata ¶
func (m *PaymentIntentMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*PaymentIntentMutation) MetadataCleared ¶
func (m *PaymentIntentMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*PaymentIntentMutation) OldAmount ¶
func (m *PaymentIntentMutation) OldAmount(ctx context.Context) (v int64, err error)
OldAmount returns the old "amount" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldClientSecret ¶
func (m *PaymentIntentMutation) OldClientSecret(ctx context.Context) (v string, err error)
OldClientSecret returns the old "client_secret" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldCurrency ¶
func (m *PaymentIntentMutation) OldCurrency(ctx context.Context) (v string, err error)
OldCurrency returns the old "currency" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldDescription ¶
func (m *PaymentIntentMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PaymentIntentMutation) OldMetadata ¶
func (m *PaymentIntentMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldProvider ¶
func (m *PaymentIntentMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldProviderPaymentIntentID ¶
func (m *PaymentIntentMutation) OldProviderPaymentIntentID(ctx context.Context) (v string, err error)
OldProviderPaymentIntentID returns the old "provider_payment_intent_id" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldStatus ¶
func (m *PaymentIntentMutation) OldStatus(ctx context.Context) (v paymentintent.Status, err error)
OldStatus returns the old "status" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PaymentIntent entity. If the PaymentIntent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentIntentMutation) Op ¶
func (m *PaymentIntentMutation) Op() Op
Op returns the operation name.
func (*PaymentIntentMutation) Provider ¶
func (m *PaymentIntentMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*PaymentIntentMutation) ProviderPaymentIntentID ¶
func (m *PaymentIntentMutation) ProviderPaymentIntentID() (r string, exists bool)
ProviderPaymentIntentID returns the value of the "provider_payment_intent_id" field in the mutation.
func (*PaymentIntentMutation) RemovedEdges ¶
func (m *PaymentIntentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PaymentIntentMutation) RemovedIDs ¶
func (m *PaymentIntentMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PaymentIntentMutation) ResetAmount ¶
func (m *PaymentIntentMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*PaymentIntentMutation) ResetClientSecret ¶
func (m *PaymentIntentMutation) ResetClientSecret()
ResetClientSecret resets all changes to the "client_secret" field.
func (*PaymentIntentMutation) ResetCreatedAt ¶
func (m *PaymentIntentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PaymentIntentMutation) ResetCurrency ¶
func (m *PaymentIntentMutation) ResetCurrency()
ResetCurrency resets all changes to the "currency" field.
func (*PaymentIntentMutation) ResetCustomer ¶
func (m *PaymentIntentMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*PaymentIntentMutation) ResetDescription ¶
func (m *PaymentIntentMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*PaymentIntentMutation) ResetEdge ¶
func (m *PaymentIntentMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PaymentIntentMutation) ResetField ¶
func (m *PaymentIntentMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentIntentMutation) ResetMetadata ¶
func (m *PaymentIntentMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*PaymentIntentMutation) ResetProvider ¶
func (m *PaymentIntentMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*PaymentIntentMutation) ResetProviderPaymentIntentID ¶
func (m *PaymentIntentMutation) ResetProviderPaymentIntentID()
ResetProviderPaymentIntentID resets all changes to the "provider_payment_intent_id" field.
func (*PaymentIntentMutation) ResetStatus ¶
func (m *PaymentIntentMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PaymentIntentMutation) ResetUpdatedAt ¶
func (m *PaymentIntentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PaymentIntentMutation) SetAmount ¶
func (m *PaymentIntentMutation) SetAmount(i int64)
SetAmount sets the "amount" field.
func (*PaymentIntentMutation) SetClientSecret ¶
func (m *PaymentIntentMutation) SetClientSecret(s string)
SetClientSecret sets the "client_secret" field.
func (*PaymentIntentMutation) SetCreatedAt ¶
func (m *PaymentIntentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PaymentIntentMutation) SetCurrency ¶
func (m *PaymentIntentMutation) SetCurrency(s string)
SetCurrency sets the "currency" field.
func (*PaymentIntentMutation) SetCustomerID ¶
func (m *PaymentIntentMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by id.
func (*PaymentIntentMutation) SetDescription ¶
func (m *PaymentIntentMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*PaymentIntentMutation) SetField ¶
func (m *PaymentIntentMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentIntentMutation) SetMetadata ¶
func (m *PaymentIntentMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*PaymentIntentMutation) SetOp ¶
func (m *PaymentIntentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PaymentIntentMutation) SetProvider ¶
func (m *PaymentIntentMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*PaymentIntentMutation) SetProviderPaymentIntentID ¶
func (m *PaymentIntentMutation) SetProviderPaymentIntentID(s string)
SetProviderPaymentIntentID sets the "provider_payment_intent_id" field.
func (*PaymentIntentMutation) SetStatus ¶
func (m *PaymentIntentMutation) SetStatus(pa paymentintent.Status)
SetStatus sets the "status" field.
func (*PaymentIntentMutation) SetUpdatedAt ¶
func (m *PaymentIntentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PaymentIntentMutation) Status ¶
func (m *PaymentIntentMutation) Status() (r paymentintent.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (PaymentIntentMutation) Tx ¶
func (m PaymentIntentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PaymentIntentMutation) Type ¶
func (m *PaymentIntentMutation) Type() string
Type returns the node type of this mutation (PaymentIntent).
func (*PaymentIntentMutation) UpdatedAt ¶
func (m *PaymentIntentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PaymentIntentMutation) Where ¶
func (m *PaymentIntentMutation) Where(ps ...predicate.PaymentIntent)
Where appends a list predicates to the PaymentIntentMutation builder.
func (*PaymentIntentMutation) WhereP ¶
func (m *PaymentIntentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PaymentIntentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PaymentIntentQuery ¶
type PaymentIntentQuery struct {
// contains filtered or unexported fields
}
PaymentIntentQuery is the builder for querying PaymentIntent entities.
func (*PaymentIntentQuery) Aggregate ¶
func (_q *PaymentIntentQuery) Aggregate(fns ...AggregateFunc) *PaymentIntentSelect
Aggregate returns a PaymentIntentSelect configured with the given aggregations.
func (*PaymentIntentQuery) All ¶
func (_q *PaymentIntentQuery) All(ctx context.Context) ([]*PaymentIntent, error)
All executes the query and returns a list of PaymentIntents.
func (*PaymentIntentQuery) AllX ¶
func (_q *PaymentIntentQuery) AllX(ctx context.Context) []*PaymentIntent
AllX is like All, but panics if an error occurs.
func (*PaymentIntentQuery) Clone ¶
func (_q *PaymentIntentQuery) Clone() *PaymentIntentQuery
Clone returns a duplicate of the PaymentIntentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PaymentIntentQuery) Count ¶
func (_q *PaymentIntentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PaymentIntentQuery) CountX ¶
func (_q *PaymentIntentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PaymentIntentQuery) Exist ¶
func (_q *PaymentIntentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PaymentIntentQuery) ExistX ¶
func (_q *PaymentIntentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PaymentIntentQuery) First ¶
func (_q *PaymentIntentQuery) First(ctx context.Context) (*PaymentIntent, error)
First returns the first PaymentIntent entity from the query. Returns a *NotFoundError when no PaymentIntent was found.
func (*PaymentIntentQuery) FirstID ¶
func (_q *PaymentIntentQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PaymentIntent ID from the query. Returns a *NotFoundError when no PaymentIntent ID was found.
func (*PaymentIntentQuery) FirstIDX ¶
func (_q *PaymentIntentQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PaymentIntentQuery) FirstX ¶
func (_q *PaymentIntentQuery) FirstX(ctx context.Context) *PaymentIntent
FirstX is like First, but panics if an error occurs.
func (*PaymentIntentQuery) GroupBy ¶
func (_q *PaymentIntentQuery) GroupBy(field string, fields ...string) *PaymentIntentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
ProviderPaymentIntentID string `json:"provider_payment_intent_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.PaymentIntent.Query().
GroupBy(paymentintent.FieldProviderPaymentIntentID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PaymentIntentQuery) IDs ¶
func (_q *PaymentIntentQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PaymentIntent IDs.
func (*PaymentIntentQuery) IDsX ¶
func (_q *PaymentIntentQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PaymentIntentQuery) Limit ¶
func (_q *PaymentIntentQuery) Limit(limit int) *PaymentIntentQuery
Limit the number of records to be returned by this query.
func (*PaymentIntentQuery) Offset ¶
func (_q *PaymentIntentQuery) Offset(offset int) *PaymentIntentQuery
Offset to start from.
func (*PaymentIntentQuery) Only ¶
func (_q *PaymentIntentQuery) Only(ctx context.Context) (*PaymentIntent, error)
Only returns a single PaymentIntent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PaymentIntent entity is found. Returns a *NotFoundError when no PaymentIntent entities are found.
func (*PaymentIntentQuery) OnlyID ¶
func (_q *PaymentIntentQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PaymentIntent ID in the query. Returns a *NotSingularError when more than one PaymentIntent ID is found. Returns a *NotFoundError when no entities are found.
func (*PaymentIntentQuery) OnlyIDX ¶
func (_q *PaymentIntentQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PaymentIntentQuery) OnlyX ¶
func (_q *PaymentIntentQuery) OnlyX(ctx context.Context) *PaymentIntent
OnlyX is like Only, but panics if an error occurs.
func (*PaymentIntentQuery) Order ¶
func (_q *PaymentIntentQuery) Order(o ...paymentintent.OrderOption) *PaymentIntentQuery
Order specifies how the records should be ordered.
func (*PaymentIntentQuery) QueryCustomer ¶
func (_q *PaymentIntentQuery) QueryCustomer() *PaymentCustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*PaymentIntentQuery) Select ¶
func (_q *PaymentIntentQuery) Select(fields ...string) *PaymentIntentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
ProviderPaymentIntentID string `json:"provider_payment_intent_id,omitempty"`
}
client.PaymentIntent.Query().
Select(paymentintent.FieldProviderPaymentIntentID).
Scan(ctx, &v)
func (*PaymentIntentQuery) Unique ¶
func (_q *PaymentIntentQuery) Unique(unique bool) *PaymentIntentQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PaymentIntentQuery) Where ¶
func (_q *PaymentIntentQuery) Where(ps ...predicate.PaymentIntent) *PaymentIntentQuery
Where adds a new predicate for the PaymentIntentQuery builder.
func (*PaymentIntentQuery) WithCustomer ¶
func (_q *PaymentIntentQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *PaymentIntentQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
type PaymentIntentSelect ¶
type PaymentIntentSelect struct {
*PaymentIntentQuery
// contains filtered or unexported fields
}
PaymentIntentSelect is the builder for selecting fields of PaymentIntent entities.
func (*PaymentIntentSelect) Aggregate ¶
func (_s *PaymentIntentSelect) Aggregate(fns ...AggregateFunc) *PaymentIntentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PaymentIntentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentIntentSelect) Scan ¶
func (_s *PaymentIntentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentIntentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentIntentUpdate ¶
type PaymentIntentUpdate struct {
// contains filtered or unexported fields
}
PaymentIntentUpdate is the builder for updating PaymentIntent entities.
func (*PaymentIntentUpdate) AddAmount ¶
func (_u *PaymentIntentUpdate) AddAmount(v int64) *PaymentIntentUpdate
AddAmount adds value to the "amount" field.
func (*PaymentIntentUpdate) ClearClientSecret ¶
func (_u *PaymentIntentUpdate) ClearClientSecret() *PaymentIntentUpdate
ClearClientSecret clears the value of the "client_secret" field.
func (*PaymentIntentUpdate) ClearCustomer ¶
func (_u *PaymentIntentUpdate) ClearCustomer() *PaymentIntentUpdate
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentUpdate) ClearDescription ¶
func (_u *PaymentIntentUpdate) ClearDescription() *PaymentIntentUpdate
ClearDescription clears the value of the "description" field.
func (*PaymentIntentUpdate) ClearMetadata ¶
func (_u *PaymentIntentUpdate) ClearMetadata() *PaymentIntentUpdate
ClearMetadata clears the value of the "metadata" field.
func (*PaymentIntentUpdate) Exec ¶
func (_u *PaymentIntentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentIntentUpdate) ExecX ¶
func (_u *PaymentIntentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentUpdate) Mutation ¶
func (_u *PaymentIntentUpdate) Mutation() *PaymentIntentMutation
Mutation returns the PaymentIntentMutation object of the builder.
func (*PaymentIntentUpdate) Save ¶
func (_u *PaymentIntentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PaymentIntentUpdate) SaveX ¶
func (_u *PaymentIntentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PaymentIntentUpdate) SetAmount ¶
func (_u *PaymentIntentUpdate) SetAmount(v int64) *PaymentIntentUpdate
SetAmount sets the "amount" field.
func (*PaymentIntentUpdate) SetClientSecret ¶
func (_u *PaymentIntentUpdate) SetClientSecret(v string) *PaymentIntentUpdate
SetClientSecret sets the "client_secret" field.
func (*PaymentIntentUpdate) SetCurrency ¶
func (_u *PaymentIntentUpdate) SetCurrency(v string) *PaymentIntentUpdate
SetCurrency sets the "currency" field.
func (*PaymentIntentUpdate) SetCustomer ¶
func (_u *PaymentIntentUpdate) SetCustomer(v *PaymentCustomer) *PaymentIntentUpdate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentUpdate) SetCustomerID ¶
func (_u *PaymentIntentUpdate) SetCustomerID(id int) *PaymentIntentUpdate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentIntentUpdate) SetDescription ¶
func (_u *PaymentIntentUpdate) SetDescription(v string) *PaymentIntentUpdate
SetDescription sets the "description" field.
func (*PaymentIntentUpdate) SetMetadata ¶
func (_u *PaymentIntentUpdate) SetMetadata(v map[string]interface{}) *PaymentIntentUpdate
SetMetadata sets the "metadata" field.
func (*PaymentIntentUpdate) SetNillableAmount ¶
func (_u *PaymentIntentUpdate) SetNillableAmount(v *int64) *PaymentIntentUpdate
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableClientSecret ¶
func (_u *PaymentIntentUpdate) SetNillableClientSecret(v *string) *PaymentIntentUpdate
SetNillableClientSecret sets the "client_secret" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableCurrency ¶
func (_u *PaymentIntentUpdate) SetNillableCurrency(v *string) *PaymentIntentUpdate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableDescription ¶
func (_u *PaymentIntentUpdate) SetNillableDescription(v *string) *PaymentIntentUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableProvider ¶
func (_u *PaymentIntentUpdate) SetNillableProvider(v *string) *PaymentIntentUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableProviderPaymentIntentID ¶
func (_u *PaymentIntentUpdate) SetNillableProviderPaymentIntentID(v *string) *PaymentIntentUpdate
SetNillableProviderPaymentIntentID sets the "provider_payment_intent_id" field if the given value is not nil.
func (*PaymentIntentUpdate) SetNillableStatus ¶
func (_u *PaymentIntentUpdate) SetNillableStatus(v *paymentintent.Status) *PaymentIntentUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentIntentUpdate) SetProvider ¶
func (_u *PaymentIntentUpdate) SetProvider(v string) *PaymentIntentUpdate
SetProvider sets the "provider" field.
func (*PaymentIntentUpdate) SetProviderPaymentIntentID ¶
func (_u *PaymentIntentUpdate) SetProviderPaymentIntentID(v string) *PaymentIntentUpdate
SetProviderPaymentIntentID sets the "provider_payment_intent_id" field.
func (*PaymentIntentUpdate) SetStatus ¶
func (_u *PaymentIntentUpdate) SetStatus(v paymentintent.Status) *PaymentIntentUpdate
SetStatus sets the "status" field.
func (*PaymentIntentUpdate) SetUpdatedAt ¶
func (_u *PaymentIntentUpdate) SetUpdatedAt(v time.Time) *PaymentIntentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentIntentUpdate) Where ¶
func (_u *PaymentIntentUpdate) Where(ps ...predicate.PaymentIntent) *PaymentIntentUpdate
Where appends a list predicates to the PaymentIntentUpdate builder.
type PaymentIntentUpdateOne ¶
type PaymentIntentUpdateOne struct {
// contains filtered or unexported fields
}
PaymentIntentUpdateOne is the builder for updating a single PaymentIntent entity.
func (*PaymentIntentUpdateOne) AddAmount ¶
func (_u *PaymentIntentUpdateOne) AddAmount(v int64) *PaymentIntentUpdateOne
AddAmount adds value to the "amount" field.
func (*PaymentIntentUpdateOne) ClearClientSecret ¶
func (_u *PaymentIntentUpdateOne) ClearClientSecret() *PaymentIntentUpdateOne
ClearClientSecret clears the value of the "client_secret" field.
func (*PaymentIntentUpdateOne) ClearCustomer ¶
func (_u *PaymentIntentUpdateOne) ClearCustomer() *PaymentIntentUpdateOne
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentUpdateOne) ClearDescription ¶
func (_u *PaymentIntentUpdateOne) ClearDescription() *PaymentIntentUpdateOne
ClearDescription clears the value of the "description" field.
func (*PaymentIntentUpdateOne) ClearMetadata ¶
func (_u *PaymentIntentUpdateOne) ClearMetadata() *PaymentIntentUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*PaymentIntentUpdateOne) Exec ¶
func (_u *PaymentIntentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PaymentIntentUpdateOne) ExecX ¶
func (_u *PaymentIntentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentIntentUpdateOne) Mutation ¶
func (_u *PaymentIntentUpdateOne) Mutation() *PaymentIntentMutation
Mutation returns the PaymentIntentMutation object of the builder.
func (*PaymentIntentUpdateOne) Save ¶
func (_u *PaymentIntentUpdateOne) Save(ctx context.Context) (*PaymentIntent, error)
Save executes the query and returns the updated PaymentIntent entity.
func (*PaymentIntentUpdateOne) SaveX ¶
func (_u *PaymentIntentUpdateOne) SaveX(ctx context.Context) *PaymentIntent
SaveX is like Save, but panics if an error occurs.
func (*PaymentIntentUpdateOne) Select ¶
func (_u *PaymentIntentUpdateOne) Select(field string, fields ...string) *PaymentIntentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PaymentIntentUpdateOne) SetAmount ¶
func (_u *PaymentIntentUpdateOne) SetAmount(v int64) *PaymentIntentUpdateOne
SetAmount sets the "amount" field.
func (*PaymentIntentUpdateOne) SetClientSecret ¶
func (_u *PaymentIntentUpdateOne) SetClientSecret(v string) *PaymentIntentUpdateOne
SetClientSecret sets the "client_secret" field.
func (*PaymentIntentUpdateOne) SetCurrency ¶
func (_u *PaymentIntentUpdateOne) SetCurrency(v string) *PaymentIntentUpdateOne
SetCurrency sets the "currency" field.
func (*PaymentIntentUpdateOne) SetCustomer ¶
func (_u *PaymentIntentUpdateOne) SetCustomer(v *PaymentCustomer) *PaymentIntentUpdateOne
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentIntentUpdateOne) SetCustomerID ¶
func (_u *PaymentIntentUpdateOne) SetCustomerID(id int) *PaymentIntentUpdateOne
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentIntentUpdateOne) SetDescription ¶
func (_u *PaymentIntentUpdateOne) SetDescription(v string) *PaymentIntentUpdateOne
SetDescription sets the "description" field.
func (*PaymentIntentUpdateOne) SetMetadata ¶
func (_u *PaymentIntentUpdateOne) SetMetadata(v map[string]interface{}) *PaymentIntentUpdateOne
SetMetadata sets the "metadata" field.
func (*PaymentIntentUpdateOne) SetNillableAmount ¶
func (_u *PaymentIntentUpdateOne) SetNillableAmount(v *int64) *PaymentIntentUpdateOne
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableClientSecret ¶
func (_u *PaymentIntentUpdateOne) SetNillableClientSecret(v *string) *PaymentIntentUpdateOne
SetNillableClientSecret sets the "client_secret" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableCurrency ¶
func (_u *PaymentIntentUpdateOne) SetNillableCurrency(v *string) *PaymentIntentUpdateOne
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableDescription ¶
func (_u *PaymentIntentUpdateOne) SetNillableDescription(v *string) *PaymentIntentUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableProvider ¶
func (_u *PaymentIntentUpdateOne) SetNillableProvider(v *string) *PaymentIntentUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableProviderPaymentIntentID ¶
func (_u *PaymentIntentUpdateOne) SetNillableProviderPaymentIntentID(v *string) *PaymentIntentUpdateOne
SetNillableProviderPaymentIntentID sets the "provider_payment_intent_id" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetNillableStatus ¶
func (_u *PaymentIntentUpdateOne) SetNillableStatus(v *paymentintent.Status) *PaymentIntentUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentIntentUpdateOne) SetProvider ¶
func (_u *PaymentIntentUpdateOne) SetProvider(v string) *PaymentIntentUpdateOne
SetProvider sets the "provider" field.
func (*PaymentIntentUpdateOne) SetProviderPaymentIntentID ¶
func (_u *PaymentIntentUpdateOne) SetProviderPaymentIntentID(v string) *PaymentIntentUpdateOne
SetProviderPaymentIntentID sets the "provider_payment_intent_id" field.
func (*PaymentIntentUpdateOne) SetStatus ¶
func (_u *PaymentIntentUpdateOne) SetStatus(v paymentintent.Status) *PaymentIntentUpdateOne
SetStatus sets the "status" field.
func (*PaymentIntentUpdateOne) SetUpdatedAt ¶
func (_u *PaymentIntentUpdateOne) SetUpdatedAt(v time.Time) *PaymentIntentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentIntentUpdateOne) Where ¶
func (_u *PaymentIntentUpdateOne) Where(ps ...predicate.PaymentIntent) *PaymentIntentUpdateOne
Where appends a list predicates to the PaymentIntentUpdate builder.
type PaymentIntents ¶
type PaymentIntents []*PaymentIntent
PaymentIntents is a parsable slice of PaymentIntent.
type PaymentMethod ¶
type PaymentMethod struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// External payment provider payment method ID
ProviderPaymentMethodID string `json:"provider_payment_method_id,omitempty"`
// Payment provider name
Provider string `json:"provider,omitempty"`
// Payment method type
Type paymentmethod.Type `json:"type,omitempty"`
// Last four digits of card/account
LastFour string `json:"last_four,omitempty"`
// Card brand (visa, mastercard, etc.)
Brand string `json:"brand,omitempty"`
// Card expiration month
ExpMonth int `json:"exp_month,omitempty"`
// Card expiration year
ExpYear int `json:"exp_year,omitempty"`
// Whether this is the default payment method
IsDefault bool `json:"is_default,omitempty"`
// Additional payment method data
Metadata map[string]interface{} `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PaymentMethodQuery when eager-loading is set.
Edges PaymentMethodEdges `json:"edges"`
// contains filtered or unexported fields
}
PaymentMethod is the model entity for the PaymentMethod schema.
func (*PaymentMethod) QueryCustomer ¶
func (_m *PaymentMethod) QueryCustomer() *PaymentCustomerQuery
QueryCustomer queries the "customer" edge of the PaymentMethod entity.
func (*PaymentMethod) String ¶
func (_m *PaymentMethod) String() string
String implements the fmt.Stringer.
func (*PaymentMethod) Unwrap ¶
func (_m *PaymentMethod) Unwrap() *PaymentMethod
Unwrap unwraps the PaymentMethod entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*PaymentMethod) Update ¶
func (_m *PaymentMethod) Update() *PaymentMethodUpdateOne
Update returns a builder for updating this PaymentMethod. Note that you need to call PaymentMethod.Unwrap() before calling this method if this PaymentMethod was returned from a transaction, and the transaction was committed or rolled back.
type PaymentMethodClient ¶
type PaymentMethodClient struct {
// contains filtered or unexported fields
}
PaymentMethodClient is a client for the PaymentMethod schema.
func NewPaymentMethodClient ¶
func NewPaymentMethodClient(c config) *PaymentMethodClient
NewPaymentMethodClient returns a client for the PaymentMethod from the given config.
func (*PaymentMethodClient) Create ¶
func (c *PaymentMethodClient) Create() *PaymentMethodCreate
Create returns a builder for creating a PaymentMethod entity.
func (*PaymentMethodClient) CreateBulk ¶
func (c *PaymentMethodClient) CreateBulk(builders ...*PaymentMethodCreate) *PaymentMethodCreateBulk
CreateBulk returns a builder for creating a bulk of PaymentMethod entities.
func (*PaymentMethodClient) Delete ¶
func (c *PaymentMethodClient) Delete() *PaymentMethodDelete
Delete returns a delete builder for PaymentMethod.
func (*PaymentMethodClient) DeleteOne ¶
func (c *PaymentMethodClient) DeleteOne(_m *PaymentMethod) *PaymentMethodDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PaymentMethodClient) DeleteOneID ¶
func (c *PaymentMethodClient) DeleteOneID(id int) *PaymentMethodDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PaymentMethodClient) Get ¶
func (c *PaymentMethodClient) Get(ctx context.Context, id int) (*PaymentMethod, error)
Get returns a PaymentMethod entity by its id.
func (*PaymentMethodClient) GetX ¶
func (c *PaymentMethodClient) GetX(ctx context.Context, id int) *PaymentMethod
GetX is like Get, but panics if an error occurs.
func (*PaymentMethodClient) Hooks ¶
func (c *PaymentMethodClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PaymentMethodClient) Intercept ¶
func (c *PaymentMethodClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `paymentmethod.Intercept(f(g(h())))`.
func (*PaymentMethodClient) Interceptors ¶
func (c *PaymentMethodClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PaymentMethodClient) MapCreateBulk ¶
func (c *PaymentMethodClient) MapCreateBulk(slice any, setFunc func(*PaymentMethodCreate, int)) *PaymentMethodCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PaymentMethodClient) Query ¶
func (c *PaymentMethodClient) Query() *PaymentMethodQuery
Query returns a query builder for PaymentMethod.
func (*PaymentMethodClient) QueryCustomer ¶
func (c *PaymentMethodClient) QueryCustomer(_m *PaymentMethod) *PaymentCustomerQuery
QueryCustomer queries the customer edge of a PaymentMethod.
func (*PaymentMethodClient) Update ¶
func (c *PaymentMethodClient) Update() *PaymentMethodUpdate
Update returns an update builder for PaymentMethod.
func (*PaymentMethodClient) UpdateOne ¶
func (c *PaymentMethodClient) UpdateOne(_m *PaymentMethod) *PaymentMethodUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PaymentMethodClient) UpdateOneID ¶
func (c *PaymentMethodClient) UpdateOneID(id int) *PaymentMethodUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PaymentMethodClient) Use ¶
func (c *PaymentMethodClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `paymentmethod.Hooks(f(g(h())))`.
type PaymentMethodCreate ¶
type PaymentMethodCreate struct {
// contains filtered or unexported fields
}
PaymentMethodCreate is the builder for creating a PaymentMethod entity.
func (*PaymentMethodCreate) Exec ¶
func (_c *PaymentMethodCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentMethodCreate) ExecX ¶
func (_c *PaymentMethodCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodCreate) Mutation ¶
func (_c *PaymentMethodCreate) Mutation() *PaymentMethodMutation
Mutation returns the PaymentMethodMutation object of the builder.
func (*PaymentMethodCreate) Save ¶
func (_c *PaymentMethodCreate) Save(ctx context.Context) (*PaymentMethod, error)
Save creates the PaymentMethod in the database.
func (*PaymentMethodCreate) SaveX ¶
func (_c *PaymentMethodCreate) SaveX(ctx context.Context) *PaymentMethod
SaveX calls Save and panics if Save returns an error.
func (*PaymentMethodCreate) SetBrand ¶
func (_c *PaymentMethodCreate) SetBrand(v string) *PaymentMethodCreate
SetBrand sets the "brand" field.
func (*PaymentMethodCreate) SetCreatedAt ¶
func (_c *PaymentMethodCreate) SetCreatedAt(v time.Time) *PaymentMethodCreate
SetCreatedAt sets the "created_at" field.
func (*PaymentMethodCreate) SetCustomer ¶
func (_c *PaymentMethodCreate) SetCustomer(v *PaymentCustomer) *PaymentMethodCreate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodCreate) SetCustomerID ¶
func (_c *PaymentMethodCreate) SetCustomerID(id int) *PaymentMethodCreate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentMethodCreate) SetExpMonth ¶
func (_c *PaymentMethodCreate) SetExpMonth(v int) *PaymentMethodCreate
SetExpMonth sets the "exp_month" field.
func (*PaymentMethodCreate) SetExpYear ¶
func (_c *PaymentMethodCreate) SetExpYear(v int) *PaymentMethodCreate
SetExpYear sets the "exp_year" field.
func (*PaymentMethodCreate) SetIsDefault ¶
func (_c *PaymentMethodCreate) SetIsDefault(v bool) *PaymentMethodCreate
SetIsDefault sets the "is_default" field.
func (*PaymentMethodCreate) SetLastFour ¶
func (_c *PaymentMethodCreate) SetLastFour(v string) *PaymentMethodCreate
SetLastFour sets the "last_four" field.
func (*PaymentMethodCreate) SetMetadata ¶
func (_c *PaymentMethodCreate) SetMetadata(v map[string]interface{}) *PaymentMethodCreate
SetMetadata sets the "metadata" field.
func (*PaymentMethodCreate) SetNillableBrand ¶
func (_c *PaymentMethodCreate) SetNillableBrand(v *string) *PaymentMethodCreate
SetNillableBrand sets the "brand" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableCreatedAt ¶
func (_c *PaymentMethodCreate) SetNillableCreatedAt(v *time.Time) *PaymentMethodCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableExpMonth ¶
func (_c *PaymentMethodCreate) SetNillableExpMonth(v *int) *PaymentMethodCreate
SetNillableExpMonth sets the "exp_month" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableExpYear ¶
func (_c *PaymentMethodCreate) SetNillableExpYear(v *int) *PaymentMethodCreate
SetNillableExpYear sets the "exp_year" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableIsDefault ¶
func (_c *PaymentMethodCreate) SetNillableIsDefault(v *bool) *PaymentMethodCreate
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableLastFour ¶
func (_c *PaymentMethodCreate) SetNillableLastFour(v *string) *PaymentMethodCreate
SetNillableLastFour sets the "last_four" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableProvider ¶
func (_c *PaymentMethodCreate) SetNillableProvider(v *string) *PaymentMethodCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableType ¶
func (_c *PaymentMethodCreate) SetNillableType(v *paymentmethod.Type) *PaymentMethodCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*PaymentMethodCreate) SetNillableUpdatedAt ¶
func (_c *PaymentMethodCreate) SetNillableUpdatedAt(v *time.Time) *PaymentMethodCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PaymentMethodCreate) SetProvider ¶
func (_c *PaymentMethodCreate) SetProvider(v string) *PaymentMethodCreate
SetProvider sets the "provider" field.
func (*PaymentMethodCreate) SetProviderPaymentMethodID ¶
func (_c *PaymentMethodCreate) SetProviderPaymentMethodID(v string) *PaymentMethodCreate
SetProviderPaymentMethodID sets the "provider_payment_method_id" field.
func (*PaymentMethodCreate) SetType ¶
func (_c *PaymentMethodCreate) SetType(v paymentmethod.Type) *PaymentMethodCreate
SetType sets the "type" field.
func (*PaymentMethodCreate) SetUpdatedAt ¶
func (_c *PaymentMethodCreate) SetUpdatedAt(v time.Time) *PaymentMethodCreate
SetUpdatedAt sets the "updated_at" field.
type PaymentMethodCreateBulk ¶
type PaymentMethodCreateBulk struct {
// contains filtered or unexported fields
}
PaymentMethodCreateBulk is the builder for creating many PaymentMethod entities in bulk.
func (*PaymentMethodCreateBulk) Exec ¶
func (_c *PaymentMethodCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentMethodCreateBulk) ExecX ¶
func (_c *PaymentMethodCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodCreateBulk) Save ¶
func (_c *PaymentMethodCreateBulk) Save(ctx context.Context) ([]*PaymentMethod, error)
Save creates the PaymentMethod entities in the database.
func (*PaymentMethodCreateBulk) SaveX ¶
func (_c *PaymentMethodCreateBulk) SaveX(ctx context.Context) []*PaymentMethod
SaveX is like Save, but panics if an error occurs.
type PaymentMethodDelete ¶
type PaymentMethodDelete struct {
// contains filtered or unexported fields
}
PaymentMethodDelete is the builder for deleting a PaymentMethod entity.
func (*PaymentMethodDelete) Exec ¶
func (_d *PaymentMethodDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PaymentMethodDelete) ExecX ¶
func (_d *PaymentMethodDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodDelete) Where ¶
func (_d *PaymentMethodDelete) Where(ps ...predicate.PaymentMethod) *PaymentMethodDelete
Where appends a list predicates to the PaymentMethodDelete builder.
type PaymentMethodDeleteOne ¶
type PaymentMethodDeleteOne struct {
// contains filtered or unexported fields
}
PaymentMethodDeleteOne is the builder for deleting a single PaymentMethod entity.
func (*PaymentMethodDeleteOne) Exec ¶
func (_d *PaymentMethodDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PaymentMethodDeleteOne) ExecX ¶
func (_d *PaymentMethodDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodDeleteOne) Where ¶
func (_d *PaymentMethodDeleteOne) Where(ps ...predicate.PaymentMethod) *PaymentMethodDeleteOne
Where appends a list predicates to the PaymentMethodDelete builder.
type PaymentMethodEdges ¶
type PaymentMethodEdges struct {
// Payment customer who owns this payment method
Customer *PaymentCustomer `json:"customer,omitempty"`
// contains filtered or unexported fields
}
PaymentMethodEdges holds the relations/edges for other nodes in the graph.
func (PaymentMethodEdges) CustomerOrErr ¶
func (e PaymentMethodEdges) CustomerOrErr() (*PaymentCustomer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PaymentMethodGroupBy ¶
type PaymentMethodGroupBy struct {
// contains filtered or unexported fields
}
PaymentMethodGroupBy is the group-by builder for PaymentMethod entities.
func (*PaymentMethodGroupBy) Aggregate ¶
func (_g *PaymentMethodGroupBy) Aggregate(fns ...AggregateFunc) *PaymentMethodGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PaymentMethodGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentMethodGroupBy) Scan ¶
func (_g *PaymentMethodGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentMethodGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentMethodMutation ¶
type PaymentMethodMutation struct {
// contains filtered or unexported fields
}
PaymentMethodMutation represents an operation that mutates the PaymentMethod nodes in the graph.
func (*PaymentMethodMutation) AddExpMonth ¶
func (m *PaymentMethodMutation) AddExpMonth(i int)
AddExpMonth adds i to the "exp_month" field.
func (*PaymentMethodMutation) AddExpYear ¶
func (m *PaymentMethodMutation) AddExpYear(i int)
AddExpYear adds i to the "exp_year" field.
func (*PaymentMethodMutation) AddField ¶
func (m *PaymentMethodMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentMethodMutation) AddedEdges ¶
func (m *PaymentMethodMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PaymentMethodMutation) AddedExpMonth ¶
func (m *PaymentMethodMutation) AddedExpMonth() (r int, exists bool)
AddedExpMonth returns the value that was added to the "exp_month" field in this mutation.
func (*PaymentMethodMutation) AddedExpYear ¶
func (m *PaymentMethodMutation) AddedExpYear() (r int, exists bool)
AddedExpYear returns the value that was added to the "exp_year" field in this mutation.
func (*PaymentMethodMutation) AddedField ¶
func (m *PaymentMethodMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentMethodMutation) AddedFields ¶
func (m *PaymentMethodMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PaymentMethodMutation) AddedIDs ¶
func (m *PaymentMethodMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PaymentMethodMutation) Brand ¶
func (m *PaymentMethodMutation) Brand() (r string, exists bool)
Brand returns the value of the "brand" field in the mutation.
func (*PaymentMethodMutation) BrandCleared ¶
func (m *PaymentMethodMutation) BrandCleared() bool
BrandCleared returns if the "brand" field was cleared in this mutation.
func (*PaymentMethodMutation) ClearBrand ¶
func (m *PaymentMethodMutation) ClearBrand()
ClearBrand clears the value of the "brand" field.
func (*PaymentMethodMutation) ClearCustomer ¶
func (m *PaymentMethodMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodMutation) ClearEdge ¶
func (m *PaymentMethodMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PaymentMethodMutation) ClearExpMonth ¶
func (m *PaymentMethodMutation) ClearExpMonth()
ClearExpMonth clears the value of the "exp_month" field.
func (*PaymentMethodMutation) ClearExpYear ¶
func (m *PaymentMethodMutation) ClearExpYear()
ClearExpYear clears the value of the "exp_year" field.
func (*PaymentMethodMutation) ClearField ¶
func (m *PaymentMethodMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentMethodMutation) ClearLastFour ¶
func (m *PaymentMethodMutation) ClearLastFour()
ClearLastFour clears the value of the "last_four" field.
func (*PaymentMethodMutation) ClearMetadata ¶
func (m *PaymentMethodMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*PaymentMethodMutation) ClearedEdges ¶
func (m *PaymentMethodMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PaymentMethodMutation) ClearedFields ¶
func (m *PaymentMethodMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PaymentMethodMutation) Client ¶
func (m PaymentMethodMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PaymentMethodMutation) CreatedAt ¶
func (m *PaymentMethodMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PaymentMethodMutation) CustomerCleared ¶
func (m *PaymentMethodMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the PaymentCustomer entity was cleared.
func (*PaymentMethodMutation) CustomerID ¶
func (m *PaymentMethodMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*PaymentMethodMutation) CustomerIDs ¶
func (m *PaymentMethodMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*PaymentMethodMutation) EdgeCleared ¶
func (m *PaymentMethodMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PaymentMethodMutation) ExpMonth ¶
func (m *PaymentMethodMutation) ExpMonth() (r int, exists bool)
ExpMonth returns the value of the "exp_month" field in the mutation.
func (*PaymentMethodMutation) ExpMonthCleared ¶
func (m *PaymentMethodMutation) ExpMonthCleared() bool
ExpMonthCleared returns if the "exp_month" field was cleared in this mutation.
func (*PaymentMethodMutation) ExpYear ¶
func (m *PaymentMethodMutation) ExpYear() (r int, exists bool)
ExpYear returns the value of the "exp_year" field in the mutation.
func (*PaymentMethodMutation) ExpYearCleared ¶
func (m *PaymentMethodMutation) ExpYearCleared() bool
ExpYearCleared returns if the "exp_year" field was cleared in this mutation.
func (*PaymentMethodMutation) Field ¶
func (m *PaymentMethodMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PaymentMethodMutation) FieldCleared ¶
func (m *PaymentMethodMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PaymentMethodMutation) Fields ¶
func (m *PaymentMethodMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PaymentMethodMutation) GetType ¶
func (m *PaymentMethodMutation) GetType() (r paymentmethod.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*PaymentMethodMutation) ID ¶
func (m *PaymentMethodMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PaymentMethodMutation) IDs ¶
func (m *PaymentMethodMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PaymentMethodMutation) IsDefault ¶
func (m *PaymentMethodMutation) IsDefault() (r bool, exists bool)
IsDefault returns the value of the "is_default" field in the mutation.
func (*PaymentMethodMutation) LastFour ¶
func (m *PaymentMethodMutation) LastFour() (r string, exists bool)
LastFour returns the value of the "last_four" field in the mutation.
func (*PaymentMethodMutation) LastFourCleared ¶
func (m *PaymentMethodMutation) LastFourCleared() bool
LastFourCleared returns if the "last_four" field was cleared in this mutation.
func (*PaymentMethodMutation) Metadata ¶
func (m *PaymentMethodMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*PaymentMethodMutation) MetadataCleared ¶
func (m *PaymentMethodMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*PaymentMethodMutation) OldBrand ¶
func (m *PaymentMethodMutation) OldBrand(ctx context.Context) (v string, err error)
OldBrand returns the old "brand" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldExpMonth ¶
func (m *PaymentMethodMutation) OldExpMonth(ctx context.Context) (v int, err error)
OldExpMonth returns the old "exp_month" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldExpYear ¶
func (m *PaymentMethodMutation) OldExpYear(ctx context.Context) (v int, err error)
OldExpYear returns the old "exp_year" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PaymentMethodMutation) OldIsDefault ¶
func (m *PaymentMethodMutation) OldIsDefault(ctx context.Context) (v bool, err error)
OldIsDefault returns the old "is_default" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldLastFour ¶
func (m *PaymentMethodMutation) OldLastFour(ctx context.Context) (v string, err error)
OldLastFour returns the old "last_four" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldMetadata ¶
func (m *PaymentMethodMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldProvider ¶
func (m *PaymentMethodMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldProviderPaymentMethodID ¶
func (m *PaymentMethodMutation) OldProviderPaymentMethodID(ctx context.Context) (v string, err error)
OldProviderPaymentMethodID returns the old "provider_payment_method_id" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldType ¶
func (m *PaymentMethodMutation) OldType(ctx context.Context) (v paymentmethod.Type, err error)
OldType returns the old "type" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PaymentMethod entity. If the PaymentMethod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PaymentMethodMutation) Op ¶
func (m *PaymentMethodMutation) Op() Op
Op returns the operation name.
func (*PaymentMethodMutation) Provider ¶
func (m *PaymentMethodMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*PaymentMethodMutation) ProviderPaymentMethodID ¶
func (m *PaymentMethodMutation) ProviderPaymentMethodID() (r string, exists bool)
ProviderPaymentMethodID returns the value of the "provider_payment_method_id" field in the mutation.
func (*PaymentMethodMutation) RemovedEdges ¶
func (m *PaymentMethodMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PaymentMethodMutation) RemovedIDs ¶
func (m *PaymentMethodMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PaymentMethodMutation) ResetBrand ¶
func (m *PaymentMethodMutation) ResetBrand()
ResetBrand resets all changes to the "brand" field.
func (*PaymentMethodMutation) ResetCreatedAt ¶
func (m *PaymentMethodMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PaymentMethodMutation) ResetCustomer ¶
func (m *PaymentMethodMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*PaymentMethodMutation) ResetEdge ¶
func (m *PaymentMethodMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PaymentMethodMutation) ResetExpMonth ¶
func (m *PaymentMethodMutation) ResetExpMonth()
ResetExpMonth resets all changes to the "exp_month" field.
func (*PaymentMethodMutation) ResetExpYear ¶
func (m *PaymentMethodMutation) ResetExpYear()
ResetExpYear resets all changes to the "exp_year" field.
func (*PaymentMethodMutation) ResetField ¶
func (m *PaymentMethodMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PaymentMethodMutation) ResetIsDefault ¶
func (m *PaymentMethodMutation) ResetIsDefault()
ResetIsDefault resets all changes to the "is_default" field.
func (*PaymentMethodMutation) ResetLastFour ¶
func (m *PaymentMethodMutation) ResetLastFour()
ResetLastFour resets all changes to the "last_four" field.
func (*PaymentMethodMutation) ResetMetadata ¶
func (m *PaymentMethodMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*PaymentMethodMutation) ResetProvider ¶
func (m *PaymentMethodMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*PaymentMethodMutation) ResetProviderPaymentMethodID ¶
func (m *PaymentMethodMutation) ResetProviderPaymentMethodID()
ResetProviderPaymentMethodID resets all changes to the "provider_payment_method_id" field.
func (*PaymentMethodMutation) ResetType ¶
func (m *PaymentMethodMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*PaymentMethodMutation) ResetUpdatedAt ¶
func (m *PaymentMethodMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PaymentMethodMutation) SetBrand ¶
func (m *PaymentMethodMutation) SetBrand(s string)
SetBrand sets the "brand" field.
func (*PaymentMethodMutation) SetCreatedAt ¶
func (m *PaymentMethodMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PaymentMethodMutation) SetCustomerID ¶
func (m *PaymentMethodMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by id.
func (*PaymentMethodMutation) SetExpMonth ¶
func (m *PaymentMethodMutation) SetExpMonth(i int)
SetExpMonth sets the "exp_month" field.
func (*PaymentMethodMutation) SetExpYear ¶
func (m *PaymentMethodMutation) SetExpYear(i int)
SetExpYear sets the "exp_year" field.
func (*PaymentMethodMutation) SetField ¶
func (m *PaymentMethodMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PaymentMethodMutation) SetIsDefault ¶
func (m *PaymentMethodMutation) SetIsDefault(b bool)
SetIsDefault sets the "is_default" field.
func (*PaymentMethodMutation) SetLastFour ¶
func (m *PaymentMethodMutation) SetLastFour(s string)
SetLastFour sets the "last_four" field.
func (*PaymentMethodMutation) SetMetadata ¶
func (m *PaymentMethodMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*PaymentMethodMutation) SetOp ¶
func (m *PaymentMethodMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PaymentMethodMutation) SetProvider ¶
func (m *PaymentMethodMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*PaymentMethodMutation) SetProviderPaymentMethodID ¶
func (m *PaymentMethodMutation) SetProviderPaymentMethodID(s string)
SetProviderPaymentMethodID sets the "provider_payment_method_id" field.
func (*PaymentMethodMutation) SetType ¶
func (m *PaymentMethodMutation) SetType(pa paymentmethod.Type)
SetType sets the "type" field.
func (*PaymentMethodMutation) SetUpdatedAt ¶
func (m *PaymentMethodMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PaymentMethodMutation) Tx ¶
func (m PaymentMethodMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PaymentMethodMutation) Type ¶
func (m *PaymentMethodMutation) Type() string
Type returns the node type of this mutation (PaymentMethod).
func (*PaymentMethodMutation) UpdatedAt ¶
func (m *PaymentMethodMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PaymentMethodMutation) Where ¶
func (m *PaymentMethodMutation) Where(ps ...predicate.PaymentMethod)
Where appends a list predicates to the PaymentMethodMutation builder.
func (*PaymentMethodMutation) WhereP ¶
func (m *PaymentMethodMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PaymentMethodMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PaymentMethodQuery ¶
type PaymentMethodQuery struct {
// contains filtered or unexported fields
}
PaymentMethodQuery is the builder for querying PaymentMethod entities.
func (*PaymentMethodQuery) Aggregate ¶
func (_q *PaymentMethodQuery) Aggregate(fns ...AggregateFunc) *PaymentMethodSelect
Aggregate returns a PaymentMethodSelect configured with the given aggregations.
func (*PaymentMethodQuery) All ¶
func (_q *PaymentMethodQuery) All(ctx context.Context) ([]*PaymentMethod, error)
All executes the query and returns a list of PaymentMethods.
func (*PaymentMethodQuery) AllX ¶
func (_q *PaymentMethodQuery) AllX(ctx context.Context) []*PaymentMethod
AllX is like All, but panics if an error occurs.
func (*PaymentMethodQuery) Clone ¶
func (_q *PaymentMethodQuery) Clone() *PaymentMethodQuery
Clone returns a duplicate of the PaymentMethodQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PaymentMethodQuery) Count ¶
func (_q *PaymentMethodQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PaymentMethodQuery) CountX ¶
func (_q *PaymentMethodQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PaymentMethodQuery) Exist ¶
func (_q *PaymentMethodQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PaymentMethodQuery) ExistX ¶
func (_q *PaymentMethodQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PaymentMethodQuery) First ¶
func (_q *PaymentMethodQuery) First(ctx context.Context) (*PaymentMethod, error)
First returns the first PaymentMethod entity from the query. Returns a *NotFoundError when no PaymentMethod was found.
func (*PaymentMethodQuery) FirstID ¶
func (_q *PaymentMethodQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PaymentMethod ID from the query. Returns a *NotFoundError when no PaymentMethod ID was found.
func (*PaymentMethodQuery) FirstIDX ¶
func (_q *PaymentMethodQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PaymentMethodQuery) FirstX ¶
func (_q *PaymentMethodQuery) FirstX(ctx context.Context) *PaymentMethod
FirstX is like First, but panics if an error occurs.
func (*PaymentMethodQuery) GroupBy ¶
func (_q *PaymentMethodQuery) GroupBy(field string, fields ...string) *PaymentMethodGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
ProviderPaymentMethodID string `json:"provider_payment_method_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.PaymentMethod.Query().
GroupBy(paymentmethod.FieldProviderPaymentMethodID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PaymentMethodQuery) IDs ¶
func (_q *PaymentMethodQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PaymentMethod IDs.
func (*PaymentMethodQuery) IDsX ¶
func (_q *PaymentMethodQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PaymentMethodQuery) Limit ¶
func (_q *PaymentMethodQuery) Limit(limit int) *PaymentMethodQuery
Limit the number of records to be returned by this query.
func (*PaymentMethodQuery) Offset ¶
func (_q *PaymentMethodQuery) Offset(offset int) *PaymentMethodQuery
Offset to start from.
func (*PaymentMethodQuery) Only ¶
func (_q *PaymentMethodQuery) Only(ctx context.Context) (*PaymentMethod, error)
Only returns a single PaymentMethod entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PaymentMethod entity is found. Returns a *NotFoundError when no PaymentMethod entities are found.
func (*PaymentMethodQuery) OnlyID ¶
func (_q *PaymentMethodQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PaymentMethod ID in the query. Returns a *NotSingularError when more than one PaymentMethod ID is found. Returns a *NotFoundError when no entities are found.
func (*PaymentMethodQuery) OnlyIDX ¶
func (_q *PaymentMethodQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PaymentMethodQuery) OnlyX ¶
func (_q *PaymentMethodQuery) OnlyX(ctx context.Context) *PaymentMethod
OnlyX is like Only, but panics if an error occurs.
func (*PaymentMethodQuery) Order ¶
func (_q *PaymentMethodQuery) Order(o ...paymentmethod.OrderOption) *PaymentMethodQuery
Order specifies how the records should be ordered.
func (*PaymentMethodQuery) QueryCustomer ¶
func (_q *PaymentMethodQuery) QueryCustomer() *PaymentCustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*PaymentMethodQuery) Select ¶
func (_q *PaymentMethodQuery) Select(fields ...string) *PaymentMethodSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
ProviderPaymentMethodID string `json:"provider_payment_method_id,omitempty"`
}
client.PaymentMethod.Query().
Select(paymentmethod.FieldProviderPaymentMethodID).
Scan(ctx, &v)
func (*PaymentMethodQuery) Unique ¶
func (_q *PaymentMethodQuery) Unique(unique bool) *PaymentMethodQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PaymentMethodQuery) Where ¶
func (_q *PaymentMethodQuery) Where(ps ...predicate.PaymentMethod) *PaymentMethodQuery
Where adds a new predicate for the PaymentMethodQuery builder.
func (*PaymentMethodQuery) WithCustomer ¶
func (_q *PaymentMethodQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *PaymentMethodQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
type PaymentMethodSelect ¶
type PaymentMethodSelect struct {
*PaymentMethodQuery
// contains filtered or unexported fields
}
PaymentMethodSelect is the builder for selecting fields of PaymentMethod entities.
func (*PaymentMethodSelect) Aggregate ¶
func (_s *PaymentMethodSelect) Aggregate(fns ...AggregateFunc) *PaymentMethodSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PaymentMethodSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentMethodSelect) Scan ¶
func (_s *PaymentMethodSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentMethodSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentMethodUpdate ¶
type PaymentMethodUpdate struct {
// contains filtered or unexported fields
}
PaymentMethodUpdate is the builder for updating PaymentMethod entities.
func (*PaymentMethodUpdate) AddExpMonth ¶
func (_u *PaymentMethodUpdate) AddExpMonth(v int) *PaymentMethodUpdate
AddExpMonth adds value to the "exp_month" field.
func (*PaymentMethodUpdate) AddExpYear ¶
func (_u *PaymentMethodUpdate) AddExpYear(v int) *PaymentMethodUpdate
AddExpYear adds value to the "exp_year" field.
func (*PaymentMethodUpdate) ClearBrand ¶
func (_u *PaymentMethodUpdate) ClearBrand() *PaymentMethodUpdate
ClearBrand clears the value of the "brand" field.
func (*PaymentMethodUpdate) ClearCustomer ¶
func (_u *PaymentMethodUpdate) ClearCustomer() *PaymentMethodUpdate
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodUpdate) ClearExpMonth ¶
func (_u *PaymentMethodUpdate) ClearExpMonth() *PaymentMethodUpdate
ClearExpMonth clears the value of the "exp_month" field.
func (*PaymentMethodUpdate) ClearExpYear ¶
func (_u *PaymentMethodUpdate) ClearExpYear() *PaymentMethodUpdate
ClearExpYear clears the value of the "exp_year" field.
func (*PaymentMethodUpdate) ClearLastFour ¶
func (_u *PaymentMethodUpdate) ClearLastFour() *PaymentMethodUpdate
ClearLastFour clears the value of the "last_four" field.
func (*PaymentMethodUpdate) ClearMetadata ¶
func (_u *PaymentMethodUpdate) ClearMetadata() *PaymentMethodUpdate
ClearMetadata clears the value of the "metadata" field.
func (*PaymentMethodUpdate) Exec ¶
func (_u *PaymentMethodUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentMethodUpdate) ExecX ¶
func (_u *PaymentMethodUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodUpdate) Mutation ¶
func (_u *PaymentMethodUpdate) Mutation() *PaymentMethodMutation
Mutation returns the PaymentMethodMutation object of the builder.
func (*PaymentMethodUpdate) Save ¶
func (_u *PaymentMethodUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PaymentMethodUpdate) SaveX ¶
func (_u *PaymentMethodUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PaymentMethodUpdate) SetBrand ¶
func (_u *PaymentMethodUpdate) SetBrand(v string) *PaymentMethodUpdate
SetBrand sets the "brand" field.
func (*PaymentMethodUpdate) SetCustomer ¶
func (_u *PaymentMethodUpdate) SetCustomer(v *PaymentCustomer) *PaymentMethodUpdate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodUpdate) SetCustomerID ¶
func (_u *PaymentMethodUpdate) SetCustomerID(id int) *PaymentMethodUpdate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentMethodUpdate) SetExpMonth ¶
func (_u *PaymentMethodUpdate) SetExpMonth(v int) *PaymentMethodUpdate
SetExpMonth sets the "exp_month" field.
func (*PaymentMethodUpdate) SetExpYear ¶
func (_u *PaymentMethodUpdate) SetExpYear(v int) *PaymentMethodUpdate
SetExpYear sets the "exp_year" field.
func (*PaymentMethodUpdate) SetIsDefault ¶
func (_u *PaymentMethodUpdate) SetIsDefault(v bool) *PaymentMethodUpdate
SetIsDefault sets the "is_default" field.
func (*PaymentMethodUpdate) SetLastFour ¶
func (_u *PaymentMethodUpdate) SetLastFour(v string) *PaymentMethodUpdate
SetLastFour sets the "last_four" field.
func (*PaymentMethodUpdate) SetMetadata ¶
func (_u *PaymentMethodUpdate) SetMetadata(v map[string]interface{}) *PaymentMethodUpdate
SetMetadata sets the "metadata" field.
func (*PaymentMethodUpdate) SetNillableBrand ¶
func (_u *PaymentMethodUpdate) SetNillableBrand(v *string) *PaymentMethodUpdate
SetNillableBrand sets the "brand" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableExpMonth ¶
func (_u *PaymentMethodUpdate) SetNillableExpMonth(v *int) *PaymentMethodUpdate
SetNillableExpMonth sets the "exp_month" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableExpYear ¶
func (_u *PaymentMethodUpdate) SetNillableExpYear(v *int) *PaymentMethodUpdate
SetNillableExpYear sets the "exp_year" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableIsDefault ¶
func (_u *PaymentMethodUpdate) SetNillableIsDefault(v *bool) *PaymentMethodUpdate
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableLastFour ¶
func (_u *PaymentMethodUpdate) SetNillableLastFour(v *string) *PaymentMethodUpdate
SetNillableLastFour sets the "last_four" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableProvider ¶
func (_u *PaymentMethodUpdate) SetNillableProvider(v *string) *PaymentMethodUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableProviderPaymentMethodID ¶
func (_u *PaymentMethodUpdate) SetNillableProviderPaymentMethodID(v *string) *PaymentMethodUpdate
SetNillableProviderPaymentMethodID sets the "provider_payment_method_id" field if the given value is not nil.
func (*PaymentMethodUpdate) SetNillableType ¶
func (_u *PaymentMethodUpdate) SetNillableType(v *paymentmethod.Type) *PaymentMethodUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*PaymentMethodUpdate) SetProvider ¶
func (_u *PaymentMethodUpdate) SetProvider(v string) *PaymentMethodUpdate
SetProvider sets the "provider" field.
func (*PaymentMethodUpdate) SetProviderPaymentMethodID ¶
func (_u *PaymentMethodUpdate) SetProviderPaymentMethodID(v string) *PaymentMethodUpdate
SetProviderPaymentMethodID sets the "provider_payment_method_id" field.
func (*PaymentMethodUpdate) SetType ¶
func (_u *PaymentMethodUpdate) SetType(v paymentmethod.Type) *PaymentMethodUpdate
SetType sets the "type" field.
func (*PaymentMethodUpdate) SetUpdatedAt ¶
func (_u *PaymentMethodUpdate) SetUpdatedAt(v time.Time) *PaymentMethodUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentMethodUpdate) Where ¶
func (_u *PaymentMethodUpdate) Where(ps ...predicate.PaymentMethod) *PaymentMethodUpdate
Where appends a list predicates to the PaymentMethodUpdate builder.
type PaymentMethodUpdateOne ¶
type PaymentMethodUpdateOne struct {
// contains filtered or unexported fields
}
PaymentMethodUpdateOne is the builder for updating a single PaymentMethod entity.
func (*PaymentMethodUpdateOne) AddExpMonth ¶
func (_u *PaymentMethodUpdateOne) AddExpMonth(v int) *PaymentMethodUpdateOne
AddExpMonth adds value to the "exp_month" field.
func (*PaymentMethodUpdateOne) AddExpYear ¶
func (_u *PaymentMethodUpdateOne) AddExpYear(v int) *PaymentMethodUpdateOne
AddExpYear adds value to the "exp_year" field.
func (*PaymentMethodUpdateOne) ClearBrand ¶
func (_u *PaymentMethodUpdateOne) ClearBrand() *PaymentMethodUpdateOne
ClearBrand clears the value of the "brand" field.
func (*PaymentMethodUpdateOne) ClearCustomer ¶
func (_u *PaymentMethodUpdateOne) ClearCustomer() *PaymentMethodUpdateOne
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodUpdateOne) ClearExpMonth ¶
func (_u *PaymentMethodUpdateOne) ClearExpMonth() *PaymentMethodUpdateOne
ClearExpMonth clears the value of the "exp_month" field.
func (*PaymentMethodUpdateOne) ClearExpYear ¶
func (_u *PaymentMethodUpdateOne) ClearExpYear() *PaymentMethodUpdateOne
ClearExpYear clears the value of the "exp_year" field.
func (*PaymentMethodUpdateOne) ClearLastFour ¶
func (_u *PaymentMethodUpdateOne) ClearLastFour() *PaymentMethodUpdateOne
ClearLastFour clears the value of the "last_four" field.
func (*PaymentMethodUpdateOne) ClearMetadata ¶
func (_u *PaymentMethodUpdateOne) ClearMetadata() *PaymentMethodUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*PaymentMethodUpdateOne) Exec ¶
func (_u *PaymentMethodUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PaymentMethodUpdateOne) ExecX ¶
func (_u *PaymentMethodUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentMethodUpdateOne) Mutation ¶
func (_u *PaymentMethodUpdateOne) Mutation() *PaymentMethodMutation
Mutation returns the PaymentMethodMutation object of the builder.
func (*PaymentMethodUpdateOne) Save ¶
func (_u *PaymentMethodUpdateOne) Save(ctx context.Context) (*PaymentMethod, error)
Save executes the query and returns the updated PaymentMethod entity.
func (*PaymentMethodUpdateOne) SaveX ¶
func (_u *PaymentMethodUpdateOne) SaveX(ctx context.Context) *PaymentMethod
SaveX is like Save, but panics if an error occurs.
func (*PaymentMethodUpdateOne) Select ¶
func (_u *PaymentMethodUpdateOne) Select(field string, fields ...string) *PaymentMethodUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PaymentMethodUpdateOne) SetBrand ¶
func (_u *PaymentMethodUpdateOne) SetBrand(v string) *PaymentMethodUpdateOne
SetBrand sets the "brand" field.
func (*PaymentMethodUpdateOne) SetCustomer ¶
func (_u *PaymentMethodUpdateOne) SetCustomer(v *PaymentCustomer) *PaymentMethodUpdateOne
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*PaymentMethodUpdateOne) SetCustomerID ¶
func (_u *PaymentMethodUpdateOne) SetCustomerID(id int) *PaymentMethodUpdateOne
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*PaymentMethodUpdateOne) SetExpMonth ¶
func (_u *PaymentMethodUpdateOne) SetExpMonth(v int) *PaymentMethodUpdateOne
SetExpMonth sets the "exp_month" field.
func (*PaymentMethodUpdateOne) SetExpYear ¶
func (_u *PaymentMethodUpdateOne) SetExpYear(v int) *PaymentMethodUpdateOne
SetExpYear sets the "exp_year" field.
func (*PaymentMethodUpdateOne) SetIsDefault ¶
func (_u *PaymentMethodUpdateOne) SetIsDefault(v bool) *PaymentMethodUpdateOne
SetIsDefault sets the "is_default" field.
func (*PaymentMethodUpdateOne) SetLastFour ¶
func (_u *PaymentMethodUpdateOne) SetLastFour(v string) *PaymentMethodUpdateOne
SetLastFour sets the "last_four" field.
func (*PaymentMethodUpdateOne) SetMetadata ¶
func (_u *PaymentMethodUpdateOne) SetMetadata(v map[string]interface{}) *PaymentMethodUpdateOne
SetMetadata sets the "metadata" field.
func (*PaymentMethodUpdateOne) SetNillableBrand ¶
func (_u *PaymentMethodUpdateOne) SetNillableBrand(v *string) *PaymentMethodUpdateOne
SetNillableBrand sets the "brand" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableExpMonth ¶
func (_u *PaymentMethodUpdateOne) SetNillableExpMonth(v *int) *PaymentMethodUpdateOne
SetNillableExpMonth sets the "exp_month" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableExpYear ¶
func (_u *PaymentMethodUpdateOne) SetNillableExpYear(v *int) *PaymentMethodUpdateOne
SetNillableExpYear sets the "exp_year" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableIsDefault ¶
func (_u *PaymentMethodUpdateOne) SetNillableIsDefault(v *bool) *PaymentMethodUpdateOne
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableLastFour ¶
func (_u *PaymentMethodUpdateOne) SetNillableLastFour(v *string) *PaymentMethodUpdateOne
SetNillableLastFour sets the "last_four" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableProvider ¶
func (_u *PaymentMethodUpdateOne) SetNillableProvider(v *string) *PaymentMethodUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableProviderPaymentMethodID ¶
func (_u *PaymentMethodUpdateOne) SetNillableProviderPaymentMethodID(v *string) *PaymentMethodUpdateOne
SetNillableProviderPaymentMethodID sets the "provider_payment_method_id" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetNillableType ¶
func (_u *PaymentMethodUpdateOne) SetNillableType(v *paymentmethod.Type) *PaymentMethodUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*PaymentMethodUpdateOne) SetProvider ¶
func (_u *PaymentMethodUpdateOne) SetProvider(v string) *PaymentMethodUpdateOne
SetProvider sets the "provider" field.
func (*PaymentMethodUpdateOne) SetProviderPaymentMethodID ¶
func (_u *PaymentMethodUpdateOne) SetProviderPaymentMethodID(v string) *PaymentMethodUpdateOne
SetProviderPaymentMethodID sets the "provider_payment_method_id" field.
func (*PaymentMethodUpdateOne) SetType ¶
func (_u *PaymentMethodUpdateOne) SetType(v paymentmethod.Type) *PaymentMethodUpdateOne
SetType sets the "type" field.
func (*PaymentMethodUpdateOne) SetUpdatedAt ¶
func (_u *PaymentMethodUpdateOne) SetUpdatedAt(v time.Time) *PaymentMethodUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentMethodUpdateOne) Where ¶
func (_u *PaymentMethodUpdateOne) Where(ps ...predicate.PaymentMethod) *PaymentMethodUpdateOne
Where appends a list predicates to the PaymentMethodUpdate builder.
type PaymentMethods ¶
type PaymentMethods []*PaymentMethod
PaymentMethods is a parsable slice of PaymentMethod.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Subscription ¶
type Subscription struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// External payment provider subscription ID
ProviderSubscriptionID string `json:"provider_subscription_id,omitempty"`
// Payment provider name
Provider string `json:"provider,omitempty"`
// Subscription status from provider
Status subscription.Status `json:"status,omitempty"`
// Price/plan ID from payment provider
PriceID string `json:"price_id,omitempty"`
// Subscription amount in smallest currency unit
Amount int64 `json:"amount,omitempty"`
// Three-letter ISO currency code
Currency string `json:"currency,omitempty"`
// Billing interval
Interval subscription.Interval `json:"interval,omitempty"`
// Number of intervals between billings
IntervalCount int `json:"interval_count,omitempty"`
// Start of current billing period
CurrentPeriodStart time.Time `json:"current_period_start,omitempty"`
// End of current billing period
CurrentPeriodEnd time.Time `json:"current_period_end,omitempty"`
// Trial period start
TrialStart time.Time `json:"trial_start,omitempty"`
// Trial period end
TrialEnd time.Time `json:"trial_end,omitempty"`
// When subscription was canceled
CanceledAt time.Time `json:"canceled_at,omitempty"`
// When subscription ended
EndedAt time.Time `json:"ended_at,omitempty"`
// Additional subscription data
Metadata map[string]interface{} `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SubscriptionQuery when eager-loading is set.
Edges SubscriptionEdges `json:"edges"`
// contains filtered or unexported fields
}
Subscription is the model entity for the Subscription schema.
func (*Subscription) QueryCustomer ¶
func (_m *Subscription) QueryCustomer() *PaymentCustomerQuery
QueryCustomer queries the "customer" edge of the Subscription entity.
func (*Subscription) String ¶
func (_m *Subscription) String() string
String implements the fmt.Stringer.
func (*Subscription) Unwrap ¶
func (_m *Subscription) Unwrap() *Subscription
Unwrap unwraps the Subscription entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Subscription) Update ¶
func (_m *Subscription) Update() *SubscriptionUpdateOne
Update returns a builder for updating this Subscription. Note that you need to call Subscription.Unwrap() before calling this method if this Subscription was returned from a transaction, and the transaction was committed or rolled back.
type SubscriptionClient ¶
type SubscriptionClient struct {
// contains filtered or unexported fields
}
SubscriptionClient is a client for the Subscription schema.
func NewSubscriptionClient ¶
func NewSubscriptionClient(c config) *SubscriptionClient
NewSubscriptionClient returns a client for the Subscription from the given config.
func (*SubscriptionClient) Create ¶
func (c *SubscriptionClient) Create() *SubscriptionCreate
Create returns a builder for creating a Subscription entity.
func (*SubscriptionClient) CreateBulk ¶
func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
CreateBulk returns a builder for creating a bulk of Subscription entities.
func (*SubscriptionClient) Delete ¶
func (c *SubscriptionClient) Delete() *SubscriptionDelete
Delete returns a delete builder for Subscription.
func (*SubscriptionClient) DeleteOne ¶
func (c *SubscriptionClient) DeleteOne(_m *Subscription) *SubscriptionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscriptionClient) DeleteOneID ¶
func (c *SubscriptionClient) DeleteOneID(id int) *SubscriptionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
Get returns a Subscription entity by its id.
func (*SubscriptionClient) GetX ¶
func (c *SubscriptionClient) GetX(ctx context.Context, id int) *Subscription
GetX is like Get, but panics if an error occurs.
func (*SubscriptionClient) Hooks ¶
func (c *SubscriptionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscriptionClient) Intercept ¶
func (c *SubscriptionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subscription.Intercept(f(g(h())))`.
func (*SubscriptionClient) Interceptors ¶
func (c *SubscriptionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SubscriptionClient) MapCreateBulk ¶
func (c *SubscriptionClient) MapCreateBulk(slice any, setFunc func(*SubscriptionCreate, int)) *SubscriptionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SubscriptionClient) Query ¶
func (c *SubscriptionClient) Query() *SubscriptionQuery
Query returns a query builder for Subscription.
func (*SubscriptionClient) QueryCustomer ¶
func (c *SubscriptionClient) QueryCustomer(_m *Subscription) *PaymentCustomerQuery
QueryCustomer queries the customer edge of a Subscription.
func (*SubscriptionClient) Update ¶
func (c *SubscriptionClient) Update() *SubscriptionUpdate
Update returns an update builder for Subscription.
func (*SubscriptionClient) UpdateOne ¶
func (c *SubscriptionClient) UpdateOne(_m *Subscription) *SubscriptionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscriptionClient) UpdateOneID ¶
func (c *SubscriptionClient) UpdateOneID(id int) *SubscriptionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscriptionClient) Use ¶
func (c *SubscriptionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscription.Hooks(f(g(h())))`.
type SubscriptionCreate ¶
type SubscriptionCreate struct {
// contains filtered or unexported fields
}
SubscriptionCreate is the builder for creating a Subscription entity.
func (*SubscriptionCreate) Exec ¶
func (_c *SubscriptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreate) ExecX ¶
func (_c *SubscriptionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreate) Mutation ¶
func (_c *SubscriptionCreate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionCreate) Save ¶
func (_c *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
Save creates the Subscription in the database.
func (*SubscriptionCreate) SaveX ¶
func (_c *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
SaveX calls Save and panics if Save returns an error.
func (*SubscriptionCreate) SetAmount ¶
func (_c *SubscriptionCreate) SetAmount(v int64) *SubscriptionCreate
SetAmount sets the "amount" field.
func (*SubscriptionCreate) SetCanceledAt ¶
func (_c *SubscriptionCreate) SetCanceledAt(v time.Time) *SubscriptionCreate
SetCanceledAt sets the "canceled_at" field.
func (*SubscriptionCreate) SetCreatedAt ¶
func (_c *SubscriptionCreate) SetCreatedAt(v time.Time) *SubscriptionCreate
SetCreatedAt sets the "created_at" field.
func (*SubscriptionCreate) SetCurrency ¶
func (_c *SubscriptionCreate) SetCurrency(v string) *SubscriptionCreate
SetCurrency sets the "currency" field.
func (*SubscriptionCreate) SetCurrentPeriodEnd ¶
func (_c *SubscriptionCreate) SetCurrentPeriodEnd(v time.Time) *SubscriptionCreate
SetCurrentPeriodEnd sets the "current_period_end" field.
func (*SubscriptionCreate) SetCurrentPeriodStart ¶
func (_c *SubscriptionCreate) SetCurrentPeriodStart(v time.Time) *SubscriptionCreate
SetCurrentPeriodStart sets the "current_period_start" field.
func (*SubscriptionCreate) SetCustomer ¶
func (_c *SubscriptionCreate) SetCustomer(v *PaymentCustomer) *SubscriptionCreate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionCreate) SetCustomerID ¶
func (_c *SubscriptionCreate) SetCustomerID(id int) *SubscriptionCreate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*SubscriptionCreate) SetEndedAt ¶
func (_c *SubscriptionCreate) SetEndedAt(v time.Time) *SubscriptionCreate
SetEndedAt sets the "ended_at" field.
func (*SubscriptionCreate) SetInterval ¶
func (_c *SubscriptionCreate) SetInterval(v subscription.Interval) *SubscriptionCreate
SetInterval sets the "interval" field.
func (*SubscriptionCreate) SetIntervalCount ¶
func (_c *SubscriptionCreate) SetIntervalCount(v int) *SubscriptionCreate
SetIntervalCount sets the "interval_count" field.
func (*SubscriptionCreate) SetMetadata ¶
func (_c *SubscriptionCreate) SetMetadata(v map[string]interface{}) *SubscriptionCreate
SetMetadata sets the "metadata" field.
func (*SubscriptionCreate) SetNillableCanceledAt ¶
func (_c *SubscriptionCreate) SetNillableCanceledAt(v *time.Time) *SubscriptionCreate
SetNillableCanceledAt sets the "canceled_at" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableCreatedAt ¶
func (_c *SubscriptionCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableCurrency ¶
func (_c *SubscriptionCreate) SetNillableCurrency(v *string) *SubscriptionCreate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableCurrentPeriodEnd ¶
func (_c *SubscriptionCreate) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionCreate
SetNillableCurrentPeriodEnd sets the "current_period_end" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableCurrentPeriodStart ¶
func (_c *SubscriptionCreate) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionCreate
SetNillableCurrentPeriodStart sets the "current_period_start" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableEndedAt ¶
func (_c *SubscriptionCreate) SetNillableEndedAt(v *time.Time) *SubscriptionCreate
SetNillableEndedAt sets the "ended_at" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableIntervalCount ¶
func (_c *SubscriptionCreate) SetNillableIntervalCount(v *int) *SubscriptionCreate
SetNillableIntervalCount sets the "interval_count" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableProvider ¶
func (_c *SubscriptionCreate) SetNillableProvider(v *string) *SubscriptionCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableStatus ¶
func (_c *SubscriptionCreate) SetNillableStatus(v *subscription.Status) *SubscriptionCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableTrialEnd ¶
func (_c *SubscriptionCreate) SetNillableTrialEnd(v *time.Time) *SubscriptionCreate
SetNillableTrialEnd sets the "trial_end" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableTrialStart ¶
func (_c *SubscriptionCreate) SetNillableTrialStart(v *time.Time) *SubscriptionCreate
SetNillableTrialStart sets the "trial_start" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableUpdatedAt ¶
func (_c *SubscriptionCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SubscriptionCreate) SetPriceID ¶
func (_c *SubscriptionCreate) SetPriceID(v string) *SubscriptionCreate
SetPriceID sets the "price_id" field.
func (*SubscriptionCreate) SetProvider ¶
func (_c *SubscriptionCreate) SetProvider(v string) *SubscriptionCreate
SetProvider sets the "provider" field.
func (*SubscriptionCreate) SetProviderSubscriptionID ¶
func (_c *SubscriptionCreate) SetProviderSubscriptionID(v string) *SubscriptionCreate
SetProviderSubscriptionID sets the "provider_subscription_id" field.
func (*SubscriptionCreate) SetStatus ¶
func (_c *SubscriptionCreate) SetStatus(v subscription.Status) *SubscriptionCreate
SetStatus sets the "status" field.
func (*SubscriptionCreate) SetTrialEnd ¶
func (_c *SubscriptionCreate) SetTrialEnd(v time.Time) *SubscriptionCreate
SetTrialEnd sets the "trial_end" field.
func (*SubscriptionCreate) SetTrialStart ¶
func (_c *SubscriptionCreate) SetTrialStart(v time.Time) *SubscriptionCreate
SetTrialStart sets the "trial_start" field.
func (*SubscriptionCreate) SetUpdatedAt ¶
func (_c *SubscriptionCreate) SetUpdatedAt(v time.Time) *SubscriptionCreate
SetUpdatedAt sets the "updated_at" field.
type SubscriptionCreateBulk ¶
type SubscriptionCreateBulk struct {
// contains filtered or unexported fields
}
SubscriptionCreateBulk is the builder for creating many Subscription entities in bulk.
func (*SubscriptionCreateBulk) Exec ¶
func (_c *SubscriptionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreateBulk) ExecX ¶
func (_c *SubscriptionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreateBulk) Save ¶
func (_c *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)
Save creates the Subscription entities in the database.
func (*SubscriptionCreateBulk) SaveX ¶
func (_c *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription
SaveX is like Save, but panics if an error occurs.
type SubscriptionDelete ¶
type SubscriptionDelete struct {
// contains filtered or unexported fields
}
SubscriptionDelete is the builder for deleting a Subscription entity.
func (*SubscriptionDelete) Exec ¶
func (_d *SubscriptionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscriptionDelete) ExecX ¶
func (_d *SubscriptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionDelete) Where ¶
func (_d *SubscriptionDelete) Where(ps ...predicate.Subscription) *SubscriptionDelete
Where appends a list predicates to the SubscriptionDelete builder.
type SubscriptionDeleteOne ¶
type SubscriptionDeleteOne struct {
// contains filtered or unexported fields
}
SubscriptionDeleteOne is the builder for deleting a single Subscription entity.
func (*SubscriptionDeleteOne) Exec ¶
func (_d *SubscriptionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscriptionDeleteOne) ExecX ¶
func (_d *SubscriptionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionDeleteOne) Where ¶
func (_d *SubscriptionDeleteOne) Where(ps ...predicate.Subscription) *SubscriptionDeleteOne
Where appends a list predicates to the SubscriptionDelete builder.
type SubscriptionEdges ¶
type SubscriptionEdges struct {
// Payment customer who owns this subscription
Customer *PaymentCustomer `json:"customer,omitempty"`
// contains filtered or unexported fields
}
SubscriptionEdges holds the relations/edges for other nodes in the graph.
func (SubscriptionEdges) CustomerOrErr ¶
func (e SubscriptionEdges) CustomerOrErr() (*PaymentCustomer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SubscriptionGroupBy ¶
type SubscriptionGroupBy struct {
// contains filtered or unexported fields
}
SubscriptionGroupBy is the group-by builder for Subscription entities.
func (*SubscriptionGroupBy) Aggregate ¶
func (_g *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscriptionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Scan ¶
func (_g *SubscriptionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionMutation ¶
type SubscriptionMutation struct {
// contains filtered or unexported fields
}
SubscriptionMutation represents an operation that mutates the Subscription nodes in the graph.
func (*SubscriptionMutation) AddAmount ¶
func (m *SubscriptionMutation) AddAmount(i int64)
AddAmount adds i to the "amount" field.
func (*SubscriptionMutation) AddField ¶
func (m *SubscriptionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SubscriptionMutation) AddIntervalCount ¶
func (m *SubscriptionMutation) AddIntervalCount(i int)
AddIntervalCount adds i to the "interval_count" field.
func (*SubscriptionMutation) AddedAmount ¶
func (m *SubscriptionMutation) AddedAmount() (r int64, exists bool)
AddedAmount returns the value that was added to the "amount" field in this mutation.
func (*SubscriptionMutation) AddedEdges ¶
func (m *SubscriptionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscriptionMutation) AddedField ¶
func (m *SubscriptionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SubscriptionMutation) AddedFields ¶
func (m *SubscriptionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscriptionMutation) AddedIDs ¶
func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscriptionMutation) AddedIntervalCount ¶
func (m *SubscriptionMutation) AddedIntervalCount() (r int, exists bool)
AddedIntervalCount returns the value that was added to the "interval_count" field in this mutation.
func (*SubscriptionMutation) Amount ¶
func (m *SubscriptionMutation) Amount() (r int64, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*SubscriptionMutation) CanceledAt ¶
func (m *SubscriptionMutation) CanceledAt() (r time.Time, exists bool)
CanceledAt returns the value of the "canceled_at" field in the mutation.
func (*SubscriptionMutation) CanceledAtCleared ¶
func (m *SubscriptionMutation) CanceledAtCleared() bool
CanceledAtCleared returns if the "canceled_at" field was cleared in this mutation.
func (*SubscriptionMutation) ClearCanceledAt ¶
func (m *SubscriptionMutation) ClearCanceledAt()
ClearCanceledAt clears the value of the "canceled_at" field.
func (*SubscriptionMutation) ClearCurrentPeriodEnd ¶
func (m *SubscriptionMutation) ClearCurrentPeriodEnd()
ClearCurrentPeriodEnd clears the value of the "current_period_end" field.
func (*SubscriptionMutation) ClearCurrentPeriodStart ¶
func (m *SubscriptionMutation) ClearCurrentPeriodStart()
ClearCurrentPeriodStart clears the value of the "current_period_start" field.
func (*SubscriptionMutation) ClearCustomer ¶
func (m *SubscriptionMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionMutation) ClearEdge ¶
func (m *SubscriptionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SubscriptionMutation) ClearEndedAt ¶
func (m *SubscriptionMutation) ClearEndedAt()
ClearEndedAt clears the value of the "ended_at" field.
func (*SubscriptionMutation) ClearField ¶
func (m *SubscriptionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SubscriptionMutation) ClearMetadata ¶
func (m *SubscriptionMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*SubscriptionMutation) ClearTrialEnd ¶
func (m *SubscriptionMutation) ClearTrialEnd()
ClearTrialEnd clears the value of the "trial_end" field.
func (*SubscriptionMutation) ClearTrialStart ¶
func (m *SubscriptionMutation) ClearTrialStart()
ClearTrialStart clears the value of the "trial_start" field.
func (*SubscriptionMutation) ClearedEdges ¶
func (m *SubscriptionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscriptionMutation) ClearedFields ¶
func (m *SubscriptionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscriptionMutation) Client ¶
func (m SubscriptionMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*SubscriptionMutation) CreatedAt ¶
func (m *SubscriptionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SubscriptionMutation) Currency ¶
func (m *SubscriptionMutation) Currency() (r string, exists bool)
Currency returns the value of the "currency" field in the mutation.
func (*SubscriptionMutation) CurrentPeriodEnd ¶
func (m *SubscriptionMutation) CurrentPeriodEnd() (r time.Time, exists bool)
CurrentPeriodEnd returns the value of the "current_period_end" field in the mutation.
func (*SubscriptionMutation) CurrentPeriodEndCleared ¶
func (m *SubscriptionMutation) CurrentPeriodEndCleared() bool
CurrentPeriodEndCleared returns if the "current_period_end" field was cleared in this mutation.
func (*SubscriptionMutation) CurrentPeriodStart ¶
func (m *SubscriptionMutation) CurrentPeriodStart() (r time.Time, exists bool)
CurrentPeriodStart returns the value of the "current_period_start" field in the mutation.
func (*SubscriptionMutation) CurrentPeriodStartCleared ¶
func (m *SubscriptionMutation) CurrentPeriodStartCleared() bool
CurrentPeriodStartCleared returns if the "current_period_start" field was cleared in this mutation.
func (*SubscriptionMutation) CustomerCleared ¶
func (m *SubscriptionMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the PaymentCustomer entity was cleared.
func (*SubscriptionMutation) CustomerID ¶
func (m *SubscriptionMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*SubscriptionMutation) CustomerIDs ¶
func (m *SubscriptionMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*SubscriptionMutation) EdgeCleared ¶
func (m *SubscriptionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscriptionMutation) EndedAt ¶
func (m *SubscriptionMutation) EndedAt() (r time.Time, exists bool)
EndedAt returns the value of the "ended_at" field in the mutation.
func (*SubscriptionMutation) EndedAtCleared ¶
func (m *SubscriptionMutation) EndedAtCleared() bool
EndedAtCleared returns if the "ended_at" field was cleared in this mutation.
func (*SubscriptionMutation) Field ¶
func (m *SubscriptionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SubscriptionMutation) FieldCleared ¶
func (m *SubscriptionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscriptionMutation) Fields ¶
func (m *SubscriptionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SubscriptionMutation) ID ¶
func (m *SubscriptionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SubscriptionMutation) IDs ¶
func (m *SubscriptionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SubscriptionMutation) Interval ¶
func (m *SubscriptionMutation) Interval() (r subscription.Interval, exists bool)
Interval returns the value of the "interval" field in the mutation.
func (*SubscriptionMutation) IntervalCount ¶
func (m *SubscriptionMutation) IntervalCount() (r int, exists bool)
IntervalCount returns the value of the "interval_count" field in the mutation.
func (*SubscriptionMutation) Metadata ¶
func (m *SubscriptionMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*SubscriptionMutation) MetadataCleared ¶
func (m *SubscriptionMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*SubscriptionMutation) OldAmount ¶
func (m *SubscriptionMutation) OldAmount(ctx context.Context) (v int64, err error)
OldAmount returns the old "amount" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldCanceledAt ¶
OldCanceledAt returns the old "canceled_at" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldCurrency ¶
func (m *SubscriptionMutation) OldCurrency(ctx context.Context) (v string, err error)
OldCurrency returns the old "currency" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldCurrentPeriodEnd ¶
OldCurrentPeriodEnd returns the old "current_period_end" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldCurrentPeriodStart ¶
OldCurrentPeriodStart returns the old "current_period_start" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldEndedAt ¶
OldEndedAt returns the old "ended_at" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SubscriptionMutation) OldInterval ¶
func (m *SubscriptionMutation) OldInterval(ctx context.Context) (v subscription.Interval, err error)
OldInterval returns the old "interval" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldIntervalCount ¶
func (m *SubscriptionMutation) OldIntervalCount(ctx context.Context) (v int, err error)
OldIntervalCount returns the old "interval_count" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldMetadata ¶
func (m *SubscriptionMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldPriceID ¶
func (m *SubscriptionMutation) OldPriceID(ctx context.Context) (v string, err error)
OldPriceID returns the old "price_id" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldProvider ¶
func (m *SubscriptionMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldProviderSubscriptionID ¶
func (m *SubscriptionMutation) OldProviderSubscriptionID(ctx context.Context) (v string, err error)
OldProviderSubscriptionID returns the old "provider_subscription_id" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldStatus ¶
func (m *SubscriptionMutation) OldStatus(ctx context.Context) (v subscription.Status, err error)
OldStatus returns the old "status" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldTrialEnd ¶
OldTrialEnd returns the old "trial_end" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldTrialStart ¶
OldTrialStart returns the old "trial_start" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Subscription entity. If the Subscription object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscriptionMutation) Op ¶
func (m *SubscriptionMutation) Op() Op
Op returns the operation name.
func (*SubscriptionMutation) PriceID ¶
func (m *SubscriptionMutation) PriceID() (r string, exists bool)
PriceID returns the value of the "price_id" field in the mutation.
func (*SubscriptionMutation) Provider ¶
func (m *SubscriptionMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*SubscriptionMutation) ProviderSubscriptionID ¶
func (m *SubscriptionMutation) ProviderSubscriptionID() (r string, exists bool)
ProviderSubscriptionID returns the value of the "provider_subscription_id" field in the mutation.
func (*SubscriptionMutation) RemovedEdges ¶
func (m *SubscriptionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscriptionMutation) RemovedIDs ¶
func (m *SubscriptionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SubscriptionMutation) ResetAmount ¶
func (m *SubscriptionMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*SubscriptionMutation) ResetCanceledAt ¶
func (m *SubscriptionMutation) ResetCanceledAt()
ResetCanceledAt resets all changes to the "canceled_at" field.
func (*SubscriptionMutation) ResetCreatedAt ¶
func (m *SubscriptionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SubscriptionMutation) ResetCurrency ¶
func (m *SubscriptionMutation) ResetCurrency()
ResetCurrency resets all changes to the "currency" field.
func (*SubscriptionMutation) ResetCurrentPeriodEnd ¶
func (m *SubscriptionMutation) ResetCurrentPeriodEnd()
ResetCurrentPeriodEnd resets all changes to the "current_period_end" field.
func (*SubscriptionMutation) ResetCurrentPeriodStart ¶
func (m *SubscriptionMutation) ResetCurrentPeriodStart()
ResetCurrentPeriodStart resets all changes to the "current_period_start" field.
func (*SubscriptionMutation) ResetCustomer ¶
func (m *SubscriptionMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*SubscriptionMutation) ResetEdge ¶
func (m *SubscriptionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SubscriptionMutation) ResetEndedAt ¶
func (m *SubscriptionMutation) ResetEndedAt()
ResetEndedAt resets all changes to the "ended_at" field.
func (*SubscriptionMutation) ResetField ¶
func (m *SubscriptionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SubscriptionMutation) ResetInterval ¶
func (m *SubscriptionMutation) ResetInterval()
ResetInterval resets all changes to the "interval" field.
func (*SubscriptionMutation) ResetIntervalCount ¶
func (m *SubscriptionMutation) ResetIntervalCount()
ResetIntervalCount resets all changes to the "interval_count" field.
func (*SubscriptionMutation) ResetMetadata ¶
func (m *SubscriptionMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*SubscriptionMutation) ResetPriceID ¶
func (m *SubscriptionMutation) ResetPriceID()
ResetPriceID resets all changes to the "price_id" field.
func (*SubscriptionMutation) ResetProvider ¶
func (m *SubscriptionMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*SubscriptionMutation) ResetProviderSubscriptionID ¶
func (m *SubscriptionMutation) ResetProviderSubscriptionID()
ResetProviderSubscriptionID resets all changes to the "provider_subscription_id" field.
func (*SubscriptionMutation) ResetStatus ¶
func (m *SubscriptionMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*SubscriptionMutation) ResetTrialEnd ¶
func (m *SubscriptionMutation) ResetTrialEnd()
ResetTrialEnd resets all changes to the "trial_end" field.
func (*SubscriptionMutation) ResetTrialStart ¶
func (m *SubscriptionMutation) ResetTrialStart()
ResetTrialStart resets all changes to the "trial_start" field.
func (*SubscriptionMutation) ResetUpdatedAt ¶
func (m *SubscriptionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SubscriptionMutation) SetAmount ¶
func (m *SubscriptionMutation) SetAmount(i int64)
SetAmount sets the "amount" field.
func (*SubscriptionMutation) SetCanceledAt ¶
func (m *SubscriptionMutation) SetCanceledAt(t time.Time)
SetCanceledAt sets the "canceled_at" field.
func (*SubscriptionMutation) SetCreatedAt ¶
func (m *SubscriptionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SubscriptionMutation) SetCurrency ¶
func (m *SubscriptionMutation) SetCurrency(s string)
SetCurrency sets the "currency" field.
func (*SubscriptionMutation) SetCurrentPeriodEnd ¶
func (m *SubscriptionMutation) SetCurrentPeriodEnd(t time.Time)
SetCurrentPeriodEnd sets the "current_period_end" field.
func (*SubscriptionMutation) SetCurrentPeriodStart ¶
func (m *SubscriptionMutation) SetCurrentPeriodStart(t time.Time)
SetCurrentPeriodStart sets the "current_period_start" field.
func (*SubscriptionMutation) SetCustomerID ¶
func (m *SubscriptionMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by id.
func (*SubscriptionMutation) SetEndedAt ¶
func (m *SubscriptionMutation) SetEndedAt(t time.Time)
SetEndedAt sets the "ended_at" field.
func (*SubscriptionMutation) SetField ¶
func (m *SubscriptionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SubscriptionMutation) SetInterval ¶
func (m *SubscriptionMutation) SetInterval(s subscription.Interval)
SetInterval sets the "interval" field.
func (*SubscriptionMutation) SetIntervalCount ¶
func (m *SubscriptionMutation) SetIntervalCount(i int)
SetIntervalCount sets the "interval_count" field.
func (*SubscriptionMutation) SetMetadata ¶
func (m *SubscriptionMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*SubscriptionMutation) SetOp ¶
func (m *SubscriptionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SubscriptionMutation) SetPriceID ¶
func (m *SubscriptionMutation) SetPriceID(s string)
SetPriceID sets the "price_id" field.
func (*SubscriptionMutation) SetProvider ¶
func (m *SubscriptionMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*SubscriptionMutation) SetProviderSubscriptionID ¶
func (m *SubscriptionMutation) SetProviderSubscriptionID(s string)
SetProviderSubscriptionID sets the "provider_subscription_id" field.
func (*SubscriptionMutation) SetStatus ¶
func (m *SubscriptionMutation) SetStatus(s subscription.Status)
SetStatus sets the "status" field.
func (*SubscriptionMutation) SetTrialEnd ¶
func (m *SubscriptionMutation) SetTrialEnd(t time.Time)
SetTrialEnd sets the "trial_end" field.
func (*SubscriptionMutation) SetTrialStart ¶
func (m *SubscriptionMutation) SetTrialStart(t time.Time)
SetTrialStart sets the "trial_start" field.
func (*SubscriptionMutation) SetUpdatedAt ¶
func (m *SubscriptionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SubscriptionMutation) Status ¶
func (m *SubscriptionMutation) Status() (r subscription.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*SubscriptionMutation) TrialEnd ¶
func (m *SubscriptionMutation) TrialEnd() (r time.Time, exists bool)
TrialEnd returns the value of the "trial_end" field in the mutation.
func (*SubscriptionMutation) TrialEndCleared ¶
func (m *SubscriptionMutation) TrialEndCleared() bool
TrialEndCleared returns if the "trial_end" field was cleared in this mutation.
func (*SubscriptionMutation) TrialStart ¶
func (m *SubscriptionMutation) TrialStart() (r time.Time, exists bool)
TrialStart returns the value of the "trial_start" field in the mutation.
func (*SubscriptionMutation) TrialStartCleared ¶
func (m *SubscriptionMutation) TrialStartCleared() bool
TrialStartCleared returns if the "trial_start" field was cleared in this mutation.
func (SubscriptionMutation) Tx ¶
func (m SubscriptionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscriptionMutation) Type ¶
func (m *SubscriptionMutation) Type() string
Type returns the node type of this mutation (Subscription).
func (*SubscriptionMutation) UpdatedAt ¶
func (m *SubscriptionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SubscriptionMutation) Where ¶
func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
Where appends a list predicates to the SubscriptionMutation builder.
func (*SubscriptionMutation) WhereP ¶
func (m *SubscriptionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SubscriptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SubscriptionQuery ¶
type SubscriptionQuery struct {
// contains filtered or unexported fields
}
SubscriptionQuery is the builder for querying Subscription entities.
func (*SubscriptionQuery) Aggregate ¶
func (_q *SubscriptionQuery) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
Aggregate returns a SubscriptionSelect configured with the given aggregations.
func (*SubscriptionQuery) All ¶
func (_q *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
All executes the query and returns a list of Subscriptions.
func (*SubscriptionQuery) AllX ¶
func (_q *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
AllX is like All, but panics if an error occurs.
func (*SubscriptionQuery) Clone ¶
func (_q *SubscriptionQuery) Clone() *SubscriptionQuery
Clone returns a duplicate of the SubscriptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscriptionQuery) Count ¶
func (_q *SubscriptionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscriptionQuery) CountX ¶
func (_q *SubscriptionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscriptionQuery) Exist ¶
func (_q *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscriptionQuery) ExistX ¶
func (_q *SubscriptionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscriptionQuery) First ¶
func (_q *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
First returns the first Subscription entity from the query. Returns a *NotFoundError when no Subscription was found.
func (*SubscriptionQuery) FirstID ¶
func (_q *SubscriptionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Subscription ID from the query. Returns a *NotFoundError when no Subscription ID was found.
func (*SubscriptionQuery) FirstIDX ¶
func (_q *SubscriptionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscriptionQuery) FirstX ¶
func (_q *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
FirstX is like First, but panics if an error occurs.
func (*SubscriptionQuery) GroupBy ¶
func (_q *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
ProviderSubscriptionID string `json:"provider_subscription_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Subscription.Query().
GroupBy(subscription.FieldProviderSubscriptionID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SubscriptionQuery) IDs ¶
func (_q *SubscriptionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Subscription IDs.
func (*SubscriptionQuery) IDsX ¶
func (_q *SubscriptionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionQuery) Limit ¶
func (_q *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
Limit the number of records to be returned by this query.
func (*SubscriptionQuery) Offset ¶
func (_q *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
Offset to start from.
func (*SubscriptionQuery) Only ¶
func (_q *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
Only returns a single Subscription entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subscription entity is found. Returns a *NotFoundError when no Subscription entities are found.
func (*SubscriptionQuery) OnlyID ¶
func (_q *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Subscription ID in the query. Returns a *NotSingularError when more than one Subscription ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscriptionQuery) OnlyIDX ¶
func (_q *SubscriptionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscriptionQuery) OnlyX ¶
func (_q *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
OnlyX is like Only, but panics if an error occurs.
func (*SubscriptionQuery) Order ¶
func (_q *SubscriptionQuery) Order(o ...subscription.OrderOption) *SubscriptionQuery
Order specifies how the records should be ordered.
func (*SubscriptionQuery) QueryCustomer ¶
func (_q *SubscriptionQuery) QueryCustomer() *PaymentCustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*SubscriptionQuery) Select ¶
func (_q *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
ProviderSubscriptionID string `json:"provider_subscription_id,omitempty"`
}
client.Subscription.Query().
Select(subscription.FieldProviderSubscriptionID).
Scan(ctx, &v)
func (*SubscriptionQuery) Unique ¶
func (_q *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SubscriptionQuery) Where ¶
func (_q *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
Where adds a new predicate for the SubscriptionQuery builder.
func (*SubscriptionQuery) WithCustomer ¶
func (_q *SubscriptionQuery) WithCustomer(opts ...func(*PaymentCustomerQuery)) *SubscriptionQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
type SubscriptionSelect ¶
type SubscriptionSelect struct {
*SubscriptionQuery
// contains filtered or unexported fields
}
SubscriptionSelect is the builder for selecting fields of Subscription entities.
func (*SubscriptionSelect) Aggregate ¶
func (_s *SubscriptionSelect) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SubscriptionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Scan ¶
func (_s *SubscriptionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionUpdate ¶
type SubscriptionUpdate struct {
// contains filtered or unexported fields
}
SubscriptionUpdate is the builder for updating Subscription entities.
func (*SubscriptionUpdate) AddAmount ¶
func (_u *SubscriptionUpdate) AddAmount(v int64) *SubscriptionUpdate
AddAmount adds value to the "amount" field.
func (*SubscriptionUpdate) AddIntervalCount ¶
func (_u *SubscriptionUpdate) AddIntervalCount(v int) *SubscriptionUpdate
AddIntervalCount adds value to the "interval_count" field.
func (*SubscriptionUpdate) ClearCanceledAt ¶
func (_u *SubscriptionUpdate) ClearCanceledAt() *SubscriptionUpdate
ClearCanceledAt clears the value of the "canceled_at" field.
func (*SubscriptionUpdate) ClearCurrentPeriodEnd ¶
func (_u *SubscriptionUpdate) ClearCurrentPeriodEnd() *SubscriptionUpdate
ClearCurrentPeriodEnd clears the value of the "current_period_end" field.
func (*SubscriptionUpdate) ClearCurrentPeriodStart ¶
func (_u *SubscriptionUpdate) ClearCurrentPeriodStart() *SubscriptionUpdate
ClearCurrentPeriodStart clears the value of the "current_period_start" field.
func (*SubscriptionUpdate) ClearCustomer ¶
func (_u *SubscriptionUpdate) ClearCustomer() *SubscriptionUpdate
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionUpdate) ClearEndedAt ¶
func (_u *SubscriptionUpdate) ClearEndedAt() *SubscriptionUpdate
ClearEndedAt clears the value of the "ended_at" field.
func (*SubscriptionUpdate) ClearMetadata ¶
func (_u *SubscriptionUpdate) ClearMetadata() *SubscriptionUpdate
ClearMetadata clears the value of the "metadata" field.
func (*SubscriptionUpdate) ClearTrialEnd ¶
func (_u *SubscriptionUpdate) ClearTrialEnd() *SubscriptionUpdate
ClearTrialEnd clears the value of the "trial_end" field.
func (*SubscriptionUpdate) ClearTrialStart ¶
func (_u *SubscriptionUpdate) ClearTrialStart() *SubscriptionUpdate
ClearTrialStart clears the value of the "trial_start" field.
func (*SubscriptionUpdate) Exec ¶
func (_u *SubscriptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpdate) ExecX ¶
func (_u *SubscriptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdate) Mutation ¶
func (_u *SubscriptionUpdate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdate) Save ¶
func (_u *SubscriptionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscriptionUpdate) SaveX ¶
func (_u *SubscriptionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdate) SetAmount ¶
func (_u *SubscriptionUpdate) SetAmount(v int64) *SubscriptionUpdate
SetAmount sets the "amount" field.
func (*SubscriptionUpdate) SetCanceledAt ¶
func (_u *SubscriptionUpdate) SetCanceledAt(v time.Time) *SubscriptionUpdate
SetCanceledAt sets the "canceled_at" field.
func (*SubscriptionUpdate) SetCurrency ¶
func (_u *SubscriptionUpdate) SetCurrency(v string) *SubscriptionUpdate
SetCurrency sets the "currency" field.
func (*SubscriptionUpdate) SetCurrentPeriodEnd ¶
func (_u *SubscriptionUpdate) SetCurrentPeriodEnd(v time.Time) *SubscriptionUpdate
SetCurrentPeriodEnd sets the "current_period_end" field.
func (*SubscriptionUpdate) SetCurrentPeriodStart ¶
func (_u *SubscriptionUpdate) SetCurrentPeriodStart(v time.Time) *SubscriptionUpdate
SetCurrentPeriodStart sets the "current_period_start" field.
func (*SubscriptionUpdate) SetCustomer ¶
func (_u *SubscriptionUpdate) SetCustomer(v *PaymentCustomer) *SubscriptionUpdate
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionUpdate) SetCustomerID ¶
func (_u *SubscriptionUpdate) SetCustomerID(id int) *SubscriptionUpdate
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*SubscriptionUpdate) SetEndedAt ¶
func (_u *SubscriptionUpdate) SetEndedAt(v time.Time) *SubscriptionUpdate
SetEndedAt sets the "ended_at" field.
func (*SubscriptionUpdate) SetInterval ¶
func (_u *SubscriptionUpdate) SetInterval(v subscription.Interval) *SubscriptionUpdate
SetInterval sets the "interval" field.
func (*SubscriptionUpdate) SetIntervalCount ¶
func (_u *SubscriptionUpdate) SetIntervalCount(v int) *SubscriptionUpdate
SetIntervalCount sets the "interval_count" field.
func (*SubscriptionUpdate) SetMetadata ¶
func (_u *SubscriptionUpdate) SetMetadata(v map[string]interface{}) *SubscriptionUpdate
SetMetadata sets the "metadata" field.
func (*SubscriptionUpdate) SetNillableAmount ¶
func (_u *SubscriptionUpdate) SetNillableAmount(v *int64) *SubscriptionUpdate
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableCanceledAt ¶
func (_u *SubscriptionUpdate) SetNillableCanceledAt(v *time.Time) *SubscriptionUpdate
SetNillableCanceledAt sets the "canceled_at" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableCurrency ¶
func (_u *SubscriptionUpdate) SetNillableCurrency(v *string) *SubscriptionUpdate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableCurrentPeriodEnd ¶
func (_u *SubscriptionUpdate) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionUpdate
SetNillableCurrentPeriodEnd sets the "current_period_end" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableCurrentPeriodStart ¶
func (_u *SubscriptionUpdate) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionUpdate
SetNillableCurrentPeriodStart sets the "current_period_start" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableEndedAt ¶
func (_u *SubscriptionUpdate) SetNillableEndedAt(v *time.Time) *SubscriptionUpdate
SetNillableEndedAt sets the "ended_at" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableInterval ¶
func (_u *SubscriptionUpdate) SetNillableInterval(v *subscription.Interval) *SubscriptionUpdate
SetNillableInterval sets the "interval" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableIntervalCount ¶
func (_u *SubscriptionUpdate) SetNillableIntervalCount(v *int) *SubscriptionUpdate
SetNillableIntervalCount sets the "interval_count" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillablePriceID ¶
func (_u *SubscriptionUpdate) SetNillablePriceID(v *string) *SubscriptionUpdate
SetNillablePriceID sets the "price_id" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableProvider ¶
func (_u *SubscriptionUpdate) SetNillableProvider(v *string) *SubscriptionUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableProviderSubscriptionID ¶
func (_u *SubscriptionUpdate) SetNillableProviderSubscriptionID(v *string) *SubscriptionUpdate
SetNillableProviderSubscriptionID sets the "provider_subscription_id" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableStatus ¶
func (_u *SubscriptionUpdate) SetNillableStatus(v *subscription.Status) *SubscriptionUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableTrialEnd ¶
func (_u *SubscriptionUpdate) SetNillableTrialEnd(v *time.Time) *SubscriptionUpdate
SetNillableTrialEnd sets the "trial_end" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableTrialStart ¶
func (_u *SubscriptionUpdate) SetNillableTrialStart(v *time.Time) *SubscriptionUpdate
SetNillableTrialStart sets the "trial_start" field if the given value is not nil.
func (*SubscriptionUpdate) SetPriceID ¶
func (_u *SubscriptionUpdate) SetPriceID(v string) *SubscriptionUpdate
SetPriceID sets the "price_id" field.
func (*SubscriptionUpdate) SetProvider ¶
func (_u *SubscriptionUpdate) SetProvider(v string) *SubscriptionUpdate
SetProvider sets the "provider" field.
func (*SubscriptionUpdate) SetProviderSubscriptionID ¶
func (_u *SubscriptionUpdate) SetProviderSubscriptionID(v string) *SubscriptionUpdate
SetProviderSubscriptionID sets the "provider_subscription_id" field.
func (*SubscriptionUpdate) SetStatus ¶
func (_u *SubscriptionUpdate) SetStatus(v subscription.Status) *SubscriptionUpdate
SetStatus sets the "status" field.
func (*SubscriptionUpdate) SetTrialEnd ¶
func (_u *SubscriptionUpdate) SetTrialEnd(v time.Time) *SubscriptionUpdate
SetTrialEnd sets the "trial_end" field.
func (*SubscriptionUpdate) SetTrialStart ¶
func (_u *SubscriptionUpdate) SetTrialStart(v time.Time) *SubscriptionUpdate
SetTrialStart sets the "trial_start" field.
func (*SubscriptionUpdate) SetUpdatedAt ¶
func (_u *SubscriptionUpdate) SetUpdatedAt(v time.Time) *SubscriptionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SubscriptionUpdate) Where ¶
func (_u *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
Where appends a list predicates to the SubscriptionUpdate builder.
type SubscriptionUpdateOne ¶
type SubscriptionUpdateOne struct {
// contains filtered or unexported fields
}
SubscriptionUpdateOne is the builder for updating a single Subscription entity.
func (*SubscriptionUpdateOne) AddAmount ¶
func (_u *SubscriptionUpdateOne) AddAmount(v int64) *SubscriptionUpdateOne
AddAmount adds value to the "amount" field.
func (*SubscriptionUpdateOne) AddIntervalCount ¶
func (_u *SubscriptionUpdateOne) AddIntervalCount(v int) *SubscriptionUpdateOne
AddIntervalCount adds value to the "interval_count" field.
func (*SubscriptionUpdateOne) ClearCanceledAt ¶
func (_u *SubscriptionUpdateOne) ClearCanceledAt() *SubscriptionUpdateOne
ClearCanceledAt clears the value of the "canceled_at" field.
func (*SubscriptionUpdateOne) ClearCurrentPeriodEnd ¶
func (_u *SubscriptionUpdateOne) ClearCurrentPeriodEnd() *SubscriptionUpdateOne
ClearCurrentPeriodEnd clears the value of the "current_period_end" field.
func (*SubscriptionUpdateOne) ClearCurrentPeriodStart ¶
func (_u *SubscriptionUpdateOne) ClearCurrentPeriodStart() *SubscriptionUpdateOne
ClearCurrentPeriodStart clears the value of the "current_period_start" field.
func (*SubscriptionUpdateOne) ClearCustomer ¶
func (_u *SubscriptionUpdateOne) ClearCustomer() *SubscriptionUpdateOne
ClearCustomer clears the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionUpdateOne) ClearEndedAt ¶
func (_u *SubscriptionUpdateOne) ClearEndedAt() *SubscriptionUpdateOne
ClearEndedAt clears the value of the "ended_at" field.
func (*SubscriptionUpdateOne) ClearMetadata ¶
func (_u *SubscriptionUpdateOne) ClearMetadata() *SubscriptionUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*SubscriptionUpdateOne) ClearTrialEnd ¶
func (_u *SubscriptionUpdateOne) ClearTrialEnd() *SubscriptionUpdateOne
ClearTrialEnd clears the value of the "trial_end" field.
func (*SubscriptionUpdateOne) ClearTrialStart ¶
func (_u *SubscriptionUpdateOne) ClearTrialStart() *SubscriptionUpdateOne
ClearTrialStart clears the value of the "trial_start" field.
func (*SubscriptionUpdateOne) Exec ¶
func (_u *SubscriptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionUpdateOne) ExecX ¶
func (_u *SubscriptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdateOne) Mutation ¶
func (_u *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdateOne) Save ¶
func (_u *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
Save executes the query and returns the updated Subscription entity.
func (*SubscriptionUpdateOne) SaveX ¶
func (_u *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdateOne) Select ¶
func (_u *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscriptionUpdateOne) SetAmount ¶
func (_u *SubscriptionUpdateOne) SetAmount(v int64) *SubscriptionUpdateOne
SetAmount sets the "amount" field.
func (*SubscriptionUpdateOne) SetCanceledAt ¶
func (_u *SubscriptionUpdateOne) SetCanceledAt(v time.Time) *SubscriptionUpdateOne
SetCanceledAt sets the "canceled_at" field.
func (*SubscriptionUpdateOne) SetCurrency ¶
func (_u *SubscriptionUpdateOne) SetCurrency(v string) *SubscriptionUpdateOne
SetCurrency sets the "currency" field.
func (*SubscriptionUpdateOne) SetCurrentPeriodEnd ¶
func (_u *SubscriptionUpdateOne) SetCurrentPeriodEnd(v time.Time) *SubscriptionUpdateOne
SetCurrentPeriodEnd sets the "current_period_end" field.
func (*SubscriptionUpdateOne) SetCurrentPeriodStart ¶
func (_u *SubscriptionUpdateOne) SetCurrentPeriodStart(v time.Time) *SubscriptionUpdateOne
SetCurrentPeriodStart sets the "current_period_start" field.
func (*SubscriptionUpdateOne) SetCustomer ¶
func (_u *SubscriptionUpdateOne) SetCustomer(v *PaymentCustomer) *SubscriptionUpdateOne
SetCustomer sets the "customer" edge to the PaymentCustomer entity.
func (*SubscriptionUpdateOne) SetCustomerID ¶
func (_u *SubscriptionUpdateOne) SetCustomerID(id int) *SubscriptionUpdateOne
SetCustomerID sets the "customer" edge to the PaymentCustomer entity by ID.
func (*SubscriptionUpdateOne) SetEndedAt ¶
func (_u *SubscriptionUpdateOne) SetEndedAt(v time.Time) *SubscriptionUpdateOne
SetEndedAt sets the "ended_at" field.
func (*SubscriptionUpdateOne) SetInterval ¶
func (_u *SubscriptionUpdateOne) SetInterval(v subscription.Interval) *SubscriptionUpdateOne
SetInterval sets the "interval" field.
func (*SubscriptionUpdateOne) SetIntervalCount ¶
func (_u *SubscriptionUpdateOne) SetIntervalCount(v int) *SubscriptionUpdateOne
SetIntervalCount sets the "interval_count" field.
func (*SubscriptionUpdateOne) SetMetadata ¶
func (_u *SubscriptionUpdateOne) SetMetadata(v map[string]interface{}) *SubscriptionUpdateOne
SetMetadata sets the "metadata" field.
func (*SubscriptionUpdateOne) SetNillableAmount ¶
func (_u *SubscriptionUpdateOne) SetNillableAmount(v *int64) *SubscriptionUpdateOne
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableCanceledAt ¶
func (_u *SubscriptionUpdateOne) SetNillableCanceledAt(v *time.Time) *SubscriptionUpdateOne
SetNillableCanceledAt sets the "canceled_at" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableCurrency ¶
func (_u *SubscriptionUpdateOne) SetNillableCurrency(v *string) *SubscriptionUpdateOne
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableCurrentPeriodEnd ¶
func (_u *SubscriptionUpdateOne) SetNillableCurrentPeriodEnd(v *time.Time) *SubscriptionUpdateOne
SetNillableCurrentPeriodEnd sets the "current_period_end" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableCurrentPeriodStart ¶
func (_u *SubscriptionUpdateOne) SetNillableCurrentPeriodStart(v *time.Time) *SubscriptionUpdateOne
SetNillableCurrentPeriodStart sets the "current_period_start" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableEndedAt ¶
func (_u *SubscriptionUpdateOne) SetNillableEndedAt(v *time.Time) *SubscriptionUpdateOne
SetNillableEndedAt sets the "ended_at" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableInterval ¶
func (_u *SubscriptionUpdateOne) SetNillableInterval(v *subscription.Interval) *SubscriptionUpdateOne
SetNillableInterval sets the "interval" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableIntervalCount ¶
func (_u *SubscriptionUpdateOne) SetNillableIntervalCount(v *int) *SubscriptionUpdateOne
SetNillableIntervalCount sets the "interval_count" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillablePriceID ¶
func (_u *SubscriptionUpdateOne) SetNillablePriceID(v *string) *SubscriptionUpdateOne
SetNillablePriceID sets the "price_id" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableProvider ¶
func (_u *SubscriptionUpdateOne) SetNillableProvider(v *string) *SubscriptionUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableProviderSubscriptionID ¶
func (_u *SubscriptionUpdateOne) SetNillableProviderSubscriptionID(v *string) *SubscriptionUpdateOne
SetNillableProviderSubscriptionID sets the "provider_subscription_id" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableStatus ¶
func (_u *SubscriptionUpdateOne) SetNillableStatus(v *subscription.Status) *SubscriptionUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableTrialEnd ¶
func (_u *SubscriptionUpdateOne) SetNillableTrialEnd(v *time.Time) *SubscriptionUpdateOne
SetNillableTrialEnd sets the "trial_end" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableTrialStart ¶
func (_u *SubscriptionUpdateOne) SetNillableTrialStart(v *time.Time) *SubscriptionUpdateOne
SetNillableTrialStart sets the "trial_start" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetPriceID ¶
func (_u *SubscriptionUpdateOne) SetPriceID(v string) *SubscriptionUpdateOne
SetPriceID sets the "price_id" field.
func (*SubscriptionUpdateOne) SetProvider ¶
func (_u *SubscriptionUpdateOne) SetProvider(v string) *SubscriptionUpdateOne
SetProvider sets the "provider" field.
func (*SubscriptionUpdateOne) SetProviderSubscriptionID ¶
func (_u *SubscriptionUpdateOne) SetProviderSubscriptionID(v string) *SubscriptionUpdateOne
SetProviderSubscriptionID sets the "provider_subscription_id" field.
func (*SubscriptionUpdateOne) SetStatus ¶
func (_u *SubscriptionUpdateOne) SetStatus(v subscription.Status) *SubscriptionUpdateOne
SetStatus sets the "status" field.
func (*SubscriptionUpdateOne) SetTrialEnd ¶
func (_u *SubscriptionUpdateOne) SetTrialEnd(v time.Time) *SubscriptionUpdateOne
SetTrialEnd sets the "trial_end" field.
func (*SubscriptionUpdateOne) SetTrialStart ¶
func (_u *SubscriptionUpdateOne) SetTrialStart(v time.Time) *SubscriptionUpdateOne
SetTrialStart sets the "trial_start" field.
func (*SubscriptionUpdateOne) SetUpdatedAt ¶
func (_u *SubscriptionUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SubscriptionUpdateOne) Where ¶
func (_u *SubscriptionUpdateOne) Where(ps ...predicate.Subscription) *SubscriptionUpdateOne
Where appends a list predicates to the SubscriptionUpdate builder.
type Subscriptions ¶
type Subscriptions []*Subscription
Subscriptions is a parsable slice of Subscription.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// ChatBan is the client for interacting with the ChatBan builders.
ChatBan *ChatBanClient
// ChatMessage is the client for interacting with the ChatMessage builders.
ChatMessage *ChatMessageClient
// ChatRoom is the client for interacting with the ChatRoom builders.
ChatRoom *ChatRoomClient
// PasswordToken is the client for interacting with the PasswordToken builders.
PasswordToken *PasswordTokenClient
// PaymentCustomer is the client for interacting with the PaymentCustomer builders.
PaymentCustomer *PaymentCustomerClient
// PaymentIntent is the client for interacting with the PaymentIntent builders.
PaymentIntent *PaymentIntentClient
// PaymentMethod is the client for interacting with the PaymentMethod builders.
PaymentMethod *PaymentMethodClient
// Subscription is the client for interacting with the Subscription builders.
Subscription *SubscriptionClient
// User is the client for interacting with the User builders.
User *UserClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"-"`
// Verified holds the value of the "verified" field.
Verified bool `json:"verified,omitempty"`
// Admin holds the value of the "admin" field.
Admin bool `json:"admin,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserQuery when eager-loading is set.
Edges UserEdges `json:"edges"`
// contains filtered or unexported fields
}
User is the model entity for the User schema.
func (*User) QueryChatBans ¶
func (_m *User) QueryChatBans() *ChatBanQuery
QueryChatBans queries the "chat_bans" edge of the User entity.
func (*User) QueryChatBansIssued ¶
func (_m *User) QueryChatBansIssued() *ChatBanQuery
QueryChatBansIssued queries the "chat_bans_issued" edge of the User entity.
func (*User) QueryChatMessages ¶
func (_m *User) QueryChatMessages() *ChatMessageQuery
QueryChatMessages queries the "chat_messages" edge of the User entity.
func (*User) QueryOwnedChatRooms ¶
func (_m *User) QueryOwnedChatRooms() *ChatRoomQuery
QueryOwnedChatRooms queries the "owned_chat_rooms" edge of the User entity.
func (*User) QueryOwner ¶
func (_m *User) QueryOwner() *PasswordTokenQuery
QueryOwner queries the "owner" edge of the User entity.
func (*User) QueryPaymentCustomer ¶
func (_m *User) QueryPaymentCustomer() *PaymentCustomerQuery
QueryPaymentCustomer queries the "payment_customer" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (_m *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(_m *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryChatBans ¶
func (c *UserClient) QueryChatBans(_m *User) *ChatBanQuery
QueryChatBans queries the chat_bans edge of a User.
func (*UserClient) QueryChatBansIssued ¶
func (c *UserClient) QueryChatBansIssued(_m *User) *ChatBanQuery
QueryChatBansIssued queries the chat_bans_issued edge of a User.
func (*UserClient) QueryChatMessages ¶
func (c *UserClient) QueryChatMessages(_m *User) *ChatMessageQuery
QueryChatMessages queries the chat_messages edge of a User.
func (*UserClient) QueryOwnedChatRooms ¶
func (c *UserClient) QueryOwnedChatRooms(_m *User) *ChatRoomQuery
QueryOwnedChatRooms queries the owned_chat_rooms edge of a User.
func (*UserClient) QueryOwner ¶
func (c *UserClient) QueryOwner(_m *User) *PasswordTokenQuery
QueryOwner queries the owner edge of a User.
func (*UserClient) QueryPaymentCustomer ¶
func (c *UserClient) QueryPaymentCustomer(_m *User) *PaymentCustomerQuery
QueryPaymentCustomer queries the payment_customer edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(_m *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddChatBanIDs ¶
func (_c *UserCreate) AddChatBanIDs(ids ...int) *UserCreate
AddChatBanIDs adds the "chat_bans" edge to the ChatBan entity by IDs.
func (*UserCreate) AddChatBans ¶
func (_c *UserCreate) AddChatBans(v ...*ChatBan) *UserCreate
AddChatBans adds the "chat_bans" edges to the ChatBan entity.
func (*UserCreate) AddChatBansIssued ¶
func (_c *UserCreate) AddChatBansIssued(v ...*ChatBan) *UserCreate
AddChatBansIssued adds the "chat_bans_issued" edges to the ChatBan entity.
func (*UserCreate) AddChatBansIssuedIDs ¶
func (_c *UserCreate) AddChatBansIssuedIDs(ids ...int) *UserCreate
AddChatBansIssuedIDs adds the "chat_bans_issued" edge to the ChatBan entity by IDs.
func (*UserCreate) AddChatMessageIDs ¶
func (_c *UserCreate) AddChatMessageIDs(ids ...int) *UserCreate
AddChatMessageIDs adds the "chat_messages" edge to the ChatMessage entity by IDs.
func (*UserCreate) AddChatMessages ¶
func (_c *UserCreate) AddChatMessages(v ...*ChatMessage) *UserCreate
AddChatMessages adds the "chat_messages" edges to the ChatMessage entity.
func (*UserCreate) AddOwnedChatRoomIDs ¶
func (_c *UserCreate) AddOwnedChatRoomIDs(ids ...int) *UserCreate
AddOwnedChatRoomIDs adds the "owned_chat_rooms" edge to the ChatRoom entity by IDs.
func (*UserCreate) AddOwnedChatRooms ¶
func (_c *UserCreate) AddOwnedChatRooms(v ...*ChatRoom) *UserCreate
AddOwnedChatRooms adds the "owned_chat_rooms" edges to the ChatRoom entity.
func (*UserCreate) AddOwner ¶
func (_c *UserCreate) AddOwner(v ...*PasswordToken) *UserCreate
AddOwner adds the "owner" edges to the PasswordToken entity.
func (*UserCreate) AddOwnerIDs ¶
func (_c *UserCreate) AddOwnerIDs(ids ...int) *UserCreate
AddOwnerIDs adds the "owner" edge to the PasswordToken entity by IDs.
func (*UserCreate) Exec ¶
func (_c *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (_c *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (_c *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (_c *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (_c *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAdmin ¶
func (_c *UserCreate) SetAdmin(v bool) *UserCreate
SetAdmin sets the "admin" field.
func (*UserCreate) SetCreatedAt ¶
func (_c *UserCreate) SetCreatedAt(v time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (_c *UserCreate) SetEmail(v string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetName ¶
func (_c *UserCreate) SetName(v string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableAdmin ¶
func (_c *UserCreate) SetNillableAdmin(v *bool) *UserCreate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (_c *UserCreate) SetNillableCreatedAt(v *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillablePaymentCustomerID ¶
func (_c *UserCreate) SetNillablePaymentCustomerID(id *int) *UserCreate
SetNillablePaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID if the given value is not nil.
func (*UserCreate) SetNillableVerified ¶
func (_c *UserCreate) SetNillableVerified(v *bool) *UserCreate
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (_c *UserCreate) SetPassword(v string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPaymentCustomer ¶
func (_c *UserCreate) SetPaymentCustomer(v *PaymentCustomer) *UserCreate
SetPaymentCustomer sets the "payment_customer" edge to the PaymentCustomer entity.
func (*UserCreate) SetPaymentCustomerID ¶
func (_c *UserCreate) SetPaymentCustomerID(id int) *UserCreate
SetPaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID.
func (*UserCreate) SetVerified ¶
func (_c *UserCreate) SetVerified(v bool) *UserCreate
SetVerified sets the "verified" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (_c *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (_c *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (_d *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (_d *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (_d *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (_d *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (_d *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (_d *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct {
// Owner holds the value of the owner edge.
Owner []*PasswordToken `json:"owner,omitempty"`
// PaymentCustomer holds the value of the payment_customer edge.
PaymentCustomer *PaymentCustomer `json:"payment_customer,omitempty"`
// OwnedChatRooms holds the value of the owned_chat_rooms edge.
OwnedChatRooms []*ChatRoom `json:"owned_chat_rooms,omitempty"`
// ChatMessages holds the value of the chat_messages edge.
ChatMessages []*ChatMessage `json:"chat_messages,omitempty"`
// ChatBans holds the value of the chat_bans edge.
ChatBans []*ChatBan `json:"chat_bans,omitempty"`
// ChatBansIssued holds the value of the chat_bans_issued edge.
ChatBansIssued []*ChatBan `json:"chat_bans_issued,omitempty"`
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ChatBansIssuedOrErr ¶
ChatBansIssuedOrErr returns the ChatBansIssued value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ChatBansOrErr ¶
ChatBansOrErr returns the ChatBans value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ChatMessagesOrErr ¶
func (e UserEdges) ChatMessagesOrErr() ([]*ChatMessage, error)
ChatMessagesOrErr returns the ChatMessages value or an error if the edge was not loaded in eager-loading.
func (UserEdges) OwnedChatRoomsOrErr ¶
OwnedChatRoomsOrErr returns the OwnedChatRooms value or an error if the edge was not loaded in eager-loading.
func (UserEdges) OwnerOrErr ¶
func (e UserEdges) OwnerOrErr() ([]*PasswordToken, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
func (UserEdges) PaymentCustomerOrErr ¶
func (e UserEdges) PaymentCustomerOrErr() (*PaymentCustomer, error)
PaymentCustomerOrErr returns the PaymentCustomer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (_g *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (_g *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddChatBanIDs ¶
func (m *UserMutation) AddChatBanIDs(ids ...int)
AddChatBanIDs adds the "chat_bans" edge to the ChatBan entity by ids.
func (*UserMutation) AddChatBansIssuedIDs ¶
func (m *UserMutation) AddChatBansIssuedIDs(ids ...int)
AddChatBansIssuedIDs adds the "chat_bans_issued" edge to the ChatBan entity by ids.
func (*UserMutation) AddChatMessageIDs ¶
func (m *UserMutation) AddChatMessageIDs(ids ...int)
AddChatMessageIDs adds the "chat_messages" edge to the ChatMessage entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddOwnedChatRoomIDs ¶
func (m *UserMutation) AddOwnedChatRoomIDs(ids ...int)
AddOwnedChatRoomIDs adds the "owned_chat_rooms" edge to the ChatRoom entity by ids.
func (*UserMutation) AddOwnerIDs ¶
func (m *UserMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the PasswordToken entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) Admin ¶
func (m *UserMutation) Admin() (r bool, exists bool)
Admin returns the value of the "admin" field in the mutation.
func (*UserMutation) ChatBansCleared ¶
func (m *UserMutation) ChatBansCleared() bool
ChatBansCleared reports if the "chat_bans" edge to the ChatBan entity was cleared.
func (*UserMutation) ChatBansIDs ¶
func (m *UserMutation) ChatBansIDs() (ids []int)
ChatBansIDs returns the "chat_bans" edge IDs in the mutation.
func (*UserMutation) ChatBansIssuedCleared ¶
func (m *UserMutation) ChatBansIssuedCleared() bool
ChatBansIssuedCleared reports if the "chat_bans_issued" edge to the ChatBan entity was cleared.
func (*UserMutation) ChatBansIssuedIDs ¶
func (m *UserMutation) ChatBansIssuedIDs() (ids []int)
ChatBansIssuedIDs returns the "chat_bans_issued" edge IDs in the mutation.
func (*UserMutation) ChatMessagesCleared ¶
func (m *UserMutation) ChatMessagesCleared() bool
ChatMessagesCleared reports if the "chat_messages" edge to the ChatMessage entity was cleared.
func (*UserMutation) ChatMessagesIDs ¶
func (m *UserMutation) ChatMessagesIDs() (ids []int)
ChatMessagesIDs returns the "chat_messages" edge IDs in the mutation.
func (*UserMutation) ClearChatBans ¶
func (m *UserMutation) ClearChatBans()
ClearChatBans clears the "chat_bans" edge to the ChatBan entity.
func (*UserMutation) ClearChatBansIssued ¶
func (m *UserMutation) ClearChatBansIssued()
ClearChatBansIssued clears the "chat_bans_issued" edge to the ChatBan entity.
func (*UserMutation) ClearChatMessages ¶
func (m *UserMutation) ClearChatMessages()
ClearChatMessages clears the "chat_messages" edge to the ChatMessage entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearOwnedChatRooms ¶
func (m *UserMutation) ClearOwnedChatRooms()
ClearOwnedChatRooms clears the "owned_chat_rooms" edge to the ChatRoom entity.
func (*UserMutation) ClearOwner ¶
func (m *UserMutation) ClearOwner()
ClearOwner clears the "owner" edge to the PasswordToken entity.
func (*UserMutation) ClearPaymentCustomer ¶
func (m *UserMutation) ClearPaymentCustomer()
ClearPaymentCustomer clears the "payment_customer" edge to the PaymentCustomer entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldAdmin ¶
func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)
OldAdmin returns the old "admin" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldVerified ¶
func (m *UserMutation) OldVerified(ctx context.Context) (v bool, err error)
OldVerified returns the old "verified" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OwnedChatRoomsCleared ¶
func (m *UserMutation) OwnedChatRoomsCleared() bool
OwnedChatRoomsCleared reports if the "owned_chat_rooms" edge to the ChatRoom entity was cleared.
func (*UserMutation) OwnedChatRoomsIDs ¶
func (m *UserMutation) OwnedChatRoomsIDs() (ids []int)
OwnedChatRoomsIDs returns the "owned_chat_rooms" edge IDs in the mutation.
func (*UserMutation) OwnerCleared ¶
func (m *UserMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the PasswordToken entity was cleared.
func (*UserMutation) OwnerIDs ¶
func (m *UserMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PaymentCustomerCleared ¶
func (m *UserMutation) PaymentCustomerCleared() bool
PaymentCustomerCleared reports if the "payment_customer" edge to the PaymentCustomer entity was cleared.
func (*UserMutation) PaymentCustomerID ¶
func (m *UserMutation) PaymentCustomerID() (id int, exists bool)
PaymentCustomerID returns the "payment_customer" edge ID in the mutation.
func (*UserMutation) PaymentCustomerIDs ¶
func (m *UserMutation) PaymentCustomerIDs() (ids []int)
PaymentCustomerIDs returns the "payment_customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PaymentCustomerID instead. It exists only for internal usage by the builders.
func (*UserMutation) RemoveChatBanIDs ¶
func (m *UserMutation) RemoveChatBanIDs(ids ...int)
RemoveChatBanIDs removes the "chat_bans" edge to the ChatBan entity by IDs.
func (*UserMutation) RemoveChatBansIssuedIDs ¶
func (m *UserMutation) RemoveChatBansIssuedIDs(ids ...int)
RemoveChatBansIssuedIDs removes the "chat_bans_issued" edge to the ChatBan entity by IDs.
func (*UserMutation) RemoveChatMessageIDs ¶
func (m *UserMutation) RemoveChatMessageIDs(ids ...int)
RemoveChatMessageIDs removes the "chat_messages" edge to the ChatMessage entity by IDs.
func (*UserMutation) RemoveOwnedChatRoomIDs ¶
func (m *UserMutation) RemoveOwnedChatRoomIDs(ids ...int)
RemoveOwnedChatRoomIDs removes the "owned_chat_rooms" edge to the ChatRoom entity by IDs.
func (*UserMutation) RemoveOwnerIDs ¶
func (m *UserMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the PasswordToken entity by IDs.
func (*UserMutation) RemovedChatBansIDs ¶
func (m *UserMutation) RemovedChatBansIDs() (ids []int)
RemovedChatBans returns the removed IDs of the "chat_bans" edge to the ChatBan entity.
func (*UserMutation) RemovedChatBansIssuedIDs ¶
func (m *UserMutation) RemovedChatBansIssuedIDs() (ids []int)
RemovedChatBansIssued returns the removed IDs of the "chat_bans_issued" edge to the ChatBan entity.
func (*UserMutation) RemovedChatMessagesIDs ¶
func (m *UserMutation) RemovedChatMessagesIDs() (ids []int)
RemovedChatMessages returns the removed IDs of the "chat_messages" edge to the ChatMessage entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedOwnedChatRoomsIDs ¶
func (m *UserMutation) RemovedOwnedChatRoomsIDs() (ids []int)
RemovedOwnedChatRooms returns the removed IDs of the "owned_chat_rooms" edge to the ChatRoom entity.
func (*UserMutation) RemovedOwnerIDs ¶
func (m *UserMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the PasswordToken entity.
func (*UserMutation) ResetAdmin ¶
func (m *UserMutation) ResetAdmin()
ResetAdmin resets all changes to the "admin" field.
func (*UserMutation) ResetChatBans ¶
func (m *UserMutation) ResetChatBans()
ResetChatBans resets all changes to the "chat_bans" edge.
func (*UserMutation) ResetChatBansIssued ¶
func (m *UserMutation) ResetChatBansIssued()
ResetChatBansIssued resets all changes to the "chat_bans_issued" edge.
func (*UserMutation) ResetChatMessages ¶
func (m *UserMutation) ResetChatMessages()
ResetChatMessages resets all changes to the "chat_messages" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetOwnedChatRooms ¶
func (m *UserMutation) ResetOwnedChatRooms()
ResetOwnedChatRooms resets all changes to the "owned_chat_rooms" edge.
func (*UserMutation) ResetOwner ¶
func (m *UserMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPaymentCustomer ¶
func (m *UserMutation) ResetPaymentCustomer()
ResetPaymentCustomer resets all changes to the "payment_customer" edge.
func (*UserMutation) ResetVerified ¶
func (m *UserMutation) ResetVerified()
ResetVerified resets all changes to the "verified" field.
func (*UserMutation) SetAdmin ¶
func (m *UserMutation) SetAdmin(b bool)
SetAdmin sets the "admin" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetPaymentCustomerID ¶
func (m *UserMutation) SetPaymentCustomerID(id int)
SetPaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by id.
func (*UserMutation) SetVerified ¶
func (m *UserMutation) SetVerified(b bool)
SetVerified sets the "verified" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Verified ¶
func (m *UserMutation) Verified() (r bool, exists bool)
Verified returns the value of the "verified" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (_q *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryChatBans ¶
func (_q *UserQuery) QueryChatBans() *ChatBanQuery
QueryChatBans chains the current query on the "chat_bans" edge.
func (*UserQuery) QueryChatBansIssued ¶
func (_q *UserQuery) QueryChatBansIssued() *ChatBanQuery
QueryChatBansIssued chains the current query on the "chat_bans_issued" edge.
func (*UserQuery) QueryChatMessages ¶
func (_q *UserQuery) QueryChatMessages() *ChatMessageQuery
QueryChatMessages chains the current query on the "chat_messages" edge.
func (*UserQuery) QueryOwnedChatRooms ¶
func (_q *UserQuery) QueryOwnedChatRooms() *ChatRoomQuery
QueryOwnedChatRooms chains the current query on the "owned_chat_rooms" edge.
func (*UserQuery) QueryOwner ¶
func (_q *UserQuery) QueryOwner() *PasswordTokenQuery
QueryOwner chains the current query on the "owner" edge.
func (*UserQuery) QueryPaymentCustomer ¶
func (_q *UserQuery) QueryPaymentCustomer() *PaymentCustomerQuery
QueryPaymentCustomer chains the current query on the "payment_customer" edge.
func (*UserQuery) Select ¶
func (_q *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.User.Query().
Select(user.FieldName).
Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithChatBans ¶
func (_q *UserQuery) WithChatBans(opts ...func(*ChatBanQuery)) *UserQuery
WithChatBans tells the query-builder to eager-load the nodes that are connected to the "chat_bans" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithChatBansIssued ¶
func (_q *UserQuery) WithChatBansIssued(opts ...func(*ChatBanQuery)) *UserQuery
WithChatBansIssued tells the query-builder to eager-load the nodes that are connected to the "chat_bans_issued" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithChatMessages ¶
func (_q *UserQuery) WithChatMessages(opts ...func(*ChatMessageQuery)) *UserQuery
WithChatMessages tells the query-builder to eager-load the nodes that are connected to the "chat_messages" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOwnedChatRooms ¶
func (_q *UserQuery) WithOwnedChatRooms(opts ...func(*ChatRoomQuery)) *UserQuery
WithOwnedChatRooms tells the query-builder to eager-load the nodes that are connected to the "owned_chat_rooms" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOwner ¶
func (_q *UserQuery) WithOwner(opts ...func(*PasswordTokenQuery)) *UserQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPaymentCustomer ¶
func (_q *UserQuery) WithPaymentCustomer(opts ...func(*PaymentCustomerQuery)) *UserQuery
WithPaymentCustomer tells the query-builder to eager-load the nodes that are connected to the "payment_customer" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (_s *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (_s *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddChatBanIDs ¶
func (_u *UserUpdate) AddChatBanIDs(ids ...int) *UserUpdate
AddChatBanIDs adds the "chat_bans" edge to the ChatBan entity by IDs.
func (*UserUpdate) AddChatBans ¶
func (_u *UserUpdate) AddChatBans(v ...*ChatBan) *UserUpdate
AddChatBans adds the "chat_bans" edges to the ChatBan entity.
func (*UserUpdate) AddChatBansIssued ¶
func (_u *UserUpdate) AddChatBansIssued(v ...*ChatBan) *UserUpdate
AddChatBansIssued adds the "chat_bans_issued" edges to the ChatBan entity.
func (*UserUpdate) AddChatBansIssuedIDs ¶
func (_u *UserUpdate) AddChatBansIssuedIDs(ids ...int) *UserUpdate
AddChatBansIssuedIDs adds the "chat_bans_issued" edge to the ChatBan entity by IDs.
func (*UserUpdate) AddChatMessageIDs ¶
func (_u *UserUpdate) AddChatMessageIDs(ids ...int) *UserUpdate
AddChatMessageIDs adds the "chat_messages" edge to the ChatMessage entity by IDs.
func (*UserUpdate) AddChatMessages ¶
func (_u *UserUpdate) AddChatMessages(v ...*ChatMessage) *UserUpdate
AddChatMessages adds the "chat_messages" edges to the ChatMessage entity.
func (*UserUpdate) AddOwnedChatRoomIDs ¶
func (_u *UserUpdate) AddOwnedChatRoomIDs(ids ...int) *UserUpdate
AddOwnedChatRoomIDs adds the "owned_chat_rooms" edge to the ChatRoom entity by IDs.
func (*UserUpdate) AddOwnedChatRooms ¶
func (_u *UserUpdate) AddOwnedChatRooms(v ...*ChatRoom) *UserUpdate
AddOwnedChatRooms adds the "owned_chat_rooms" edges to the ChatRoom entity.
func (*UserUpdate) AddOwner ¶
func (_u *UserUpdate) AddOwner(v ...*PasswordToken) *UserUpdate
AddOwner adds the "owner" edges to the PasswordToken entity.
func (*UserUpdate) AddOwnerIDs ¶
func (_u *UserUpdate) AddOwnerIDs(ids ...int) *UserUpdate
AddOwnerIDs adds the "owner" edge to the PasswordToken entity by IDs.
func (*UserUpdate) ClearChatBans ¶
func (_u *UserUpdate) ClearChatBans() *UserUpdate
ClearChatBans clears all "chat_bans" edges to the ChatBan entity.
func (*UserUpdate) ClearChatBansIssued ¶
func (_u *UserUpdate) ClearChatBansIssued() *UserUpdate
ClearChatBansIssued clears all "chat_bans_issued" edges to the ChatBan entity.
func (*UserUpdate) ClearChatMessages ¶
func (_u *UserUpdate) ClearChatMessages() *UserUpdate
ClearChatMessages clears all "chat_messages" edges to the ChatMessage entity.
func (*UserUpdate) ClearOwnedChatRooms ¶
func (_u *UserUpdate) ClearOwnedChatRooms() *UserUpdate
ClearOwnedChatRooms clears all "owned_chat_rooms" edges to the ChatRoom entity.
func (*UserUpdate) ClearOwner ¶
func (_u *UserUpdate) ClearOwner() *UserUpdate
ClearOwner clears all "owner" edges to the PasswordToken entity.
func (*UserUpdate) ClearPaymentCustomer ¶
func (_u *UserUpdate) ClearPaymentCustomer() *UserUpdate
ClearPaymentCustomer clears the "payment_customer" edge to the PaymentCustomer entity.
func (*UserUpdate) Exec ¶
func (_u *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (_u *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (_u *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveChatBanIDs ¶
func (_u *UserUpdate) RemoveChatBanIDs(ids ...int) *UserUpdate
RemoveChatBanIDs removes the "chat_bans" edge to ChatBan entities by IDs.
func (*UserUpdate) RemoveChatBans ¶
func (_u *UserUpdate) RemoveChatBans(v ...*ChatBan) *UserUpdate
RemoveChatBans removes "chat_bans" edges to ChatBan entities.
func (*UserUpdate) RemoveChatBansIssued ¶
func (_u *UserUpdate) RemoveChatBansIssued(v ...*ChatBan) *UserUpdate
RemoveChatBansIssued removes "chat_bans_issued" edges to ChatBan entities.
func (*UserUpdate) RemoveChatBansIssuedIDs ¶
func (_u *UserUpdate) RemoveChatBansIssuedIDs(ids ...int) *UserUpdate
RemoveChatBansIssuedIDs removes the "chat_bans_issued" edge to ChatBan entities by IDs.
func (*UserUpdate) RemoveChatMessageIDs ¶
func (_u *UserUpdate) RemoveChatMessageIDs(ids ...int) *UserUpdate
RemoveChatMessageIDs removes the "chat_messages" edge to ChatMessage entities by IDs.
func (*UserUpdate) RemoveChatMessages ¶
func (_u *UserUpdate) RemoveChatMessages(v ...*ChatMessage) *UserUpdate
RemoveChatMessages removes "chat_messages" edges to ChatMessage entities.
func (*UserUpdate) RemoveOwnedChatRoomIDs ¶
func (_u *UserUpdate) RemoveOwnedChatRoomIDs(ids ...int) *UserUpdate
RemoveOwnedChatRoomIDs removes the "owned_chat_rooms" edge to ChatRoom entities by IDs.
func (*UserUpdate) RemoveOwnedChatRooms ¶
func (_u *UserUpdate) RemoveOwnedChatRooms(v ...*ChatRoom) *UserUpdate
RemoveOwnedChatRooms removes "owned_chat_rooms" edges to ChatRoom entities.
func (*UserUpdate) RemoveOwner ¶
func (_u *UserUpdate) RemoveOwner(v ...*PasswordToken) *UserUpdate
RemoveOwner removes "owner" edges to PasswordToken entities.
func (*UserUpdate) RemoveOwnerIDs ¶
func (_u *UserUpdate) RemoveOwnerIDs(ids ...int) *UserUpdate
RemoveOwnerIDs removes the "owner" edge to PasswordToken entities by IDs.
func (*UserUpdate) Save ¶
func (_u *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (_u *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAdmin ¶
func (_u *UserUpdate) SetAdmin(v bool) *UserUpdate
SetAdmin sets the "admin" field.
func (*UserUpdate) SetEmail ¶
func (_u *UserUpdate) SetEmail(v string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetName ¶
func (_u *UserUpdate) SetName(v string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableAdmin ¶
func (_u *UserUpdate) SetNillableAdmin(v *bool) *UserUpdate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (_u *UserUpdate) SetNillableEmail(v *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (_u *UserUpdate) SetNillableName(v *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (_u *UserUpdate) SetNillablePassword(v *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillablePaymentCustomerID ¶
func (_u *UserUpdate) SetNillablePaymentCustomerID(id *int) *UserUpdate
SetNillablePaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableVerified ¶
func (_u *UserUpdate) SetNillableVerified(v *bool) *UserUpdate
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (_u *UserUpdate) SetPassword(v string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPaymentCustomer ¶
func (_u *UserUpdate) SetPaymentCustomer(v *PaymentCustomer) *UserUpdate
SetPaymentCustomer sets the "payment_customer" edge to the PaymentCustomer entity.
func (*UserUpdate) SetPaymentCustomerID ¶
func (_u *UserUpdate) SetPaymentCustomerID(id int) *UserUpdate
SetPaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID.
func (*UserUpdate) SetVerified ¶
func (_u *UserUpdate) SetVerified(v bool) *UserUpdate
SetVerified sets the "verified" field.
func (*UserUpdate) Where ¶
func (_u *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddChatBanIDs ¶
func (_u *UserUpdateOne) AddChatBanIDs(ids ...int) *UserUpdateOne
AddChatBanIDs adds the "chat_bans" edge to the ChatBan entity by IDs.
func (*UserUpdateOne) AddChatBans ¶
func (_u *UserUpdateOne) AddChatBans(v ...*ChatBan) *UserUpdateOne
AddChatBans adds the "chat_bans" edges to the ChatBan entity.
func (*UserUpdateOne) AddChatBansIssued ¶
func (_u *UserUpdateOne) AddChatBansIssued(v ...*ChatBan) *UserUpdateOne
AddChatBansIssued adds the "chat_bans_issued" edges to the ChatBan entity.
func (*UserUpdateOne) AddChatBansIssuedIDs ¶
func (_u *UserUpdateOne) AddChatBansIssuedIDs(ids ...int) *UserUpdateOne
AddChatBansIssuedIDs adds the "chat_bans_issued" edge to the ChatBan entity by IDs.
func (*UserUpdateOne) AddChatMessageIDs ¶
func (_u *UserUpdateOne) AddChatMessageIDs(ids ...int) *UserUpdateOne
AddChatMessageIDs adds the "chat_messages" edge to the ChatMessage entity by IDs.
func (*UserUpdateOne) AddChatMessages ¶
func (_u *UserUpdateOne) AddChatMessages(v ...*ChatMessage) *UserUpdateOne
AddChatMessages adds the "chat_messages" edges to the ChatMessage entity.
func (*UserUpdateOne) AddOwnedChatRoomIDs ¶
func (_u *UserUpdateOne) AddOwnedChatRoomIDs(ids ...int) *UserUpdateOne
AddOwnedChatRoomIDs adds the "owned_chat_rooms" edge to the ChatRoom entity by IDs.
func (*UserUpdateOne) AddOwnedChatRooms ¶
func (_u *UserUpdateOne) AddOwnedChatRooms(v ...*ChatRoom) *UserUpdateOne
AddOwnedChatRooms adds the "owned_chat_rooms" edges to the ChatRoom entity.
func (*UserUpdateOne) AddOwner ¶
func (_u *UserUpdateOne) AddOwner(v ...*PasswordToken) *UserUpdateOne
AddOwner adds the "owner" edges to the PasswordToken entity.
func (*UserUpdateOne) AddOwnerIDs ¶
func (_u *UserUpdateOne) AddOwnerIDs(ids ...int) *UserUpdateOne
AddOwnerIDs adds the "owner" edge to the PasswordToken entity by IDs.
func (*UserUpdateOne) ClearChatBans ¶
func (_u *UserUpdateOne) ClearChatBans() *UserUpdateOne
ClearChatBans clears all "chat_bans" edges to the ChatBan entity.
func (*UserUpdateOne) ClearChatBansIssued ¶
func (_u *UserUpdateOne) ClearChatBansIssued() *UserUpdateOne
ClearChatBansIssued clears all "chat_bans_issued" edges to the ChatBan entity.
func (*UserUpdateOne) ClearChatMessages ¶
func (_u *UserUpdateOne) ClearChatMessages() *UserUpdateOne
ClearChatMessages clears all "chat_messages" edges to the ChatMessage entity.
func (*UserUpdateOne) ClearOwnedChatRooms ¶
func (_u *UserUpdateOne) ClearOwnedChatRooms() *UserUpdateOne
ClearOwnedChatRooms clears all "owned_chat_rooms" edges to the ChatRoom entity.
func (*UserUpdateOne) ClearOwner ¶
func (_u *UserUpdateOne) ClearOwner() *UserUpdateOne
ClearOwner clears all "owner" edges to the PasswordToken entity.
func (*UserUpdateOne) ClearPaymentCustomer ¶
func (_u *UserUpdateOne) ClearPaymentCustomer() *UserUpdateOne
ClearPaymentCustomer clears the "payment_customer" edge to the PaymentCustomer entity.
func (*UserUpdateOne) Exec ¶
func (_u *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (_u *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (_u *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveChatBanIDs ¶
func (_u *UserUpdateOne) RemoveChatBanIDs(ids ...int) *UserUpdateOne
RemoveChatBanIDs removes the "chat_bans" edge to ChatBan entities by IDs.
func (*UserUpdateOne) RemoveChatBans ¶
func (_u *UserUpdateOne) RemoveChatBans(v ...*ChatBan) *UserUpdateOne
RemoveChatBans removes "chat_bans" edges to ChatBan entities.
func (*UserUpdateOne) RemoveChatBansIssued ¶
func (_u *UserUpdateOne) RemoveChatBansIssued(v ...*ChatBan) *UserUpdateOne
RemoveChatBansIssued removes "chat_bans_issued" edges to ChatBan entities.
func (*UserUpdateOne) RemoveChatBansIssuedIDs ¶
func (_u *UserUpdateOne) RemoveChatBansIssuedIDs(ids ...int) *UserUpdateOne
RemoveChatBansIssuedIDs removes the "chat_bans_issued" edge to ChatBan entities by IDs.
func (*UserUpdateOne) RemoveChatMessageIDs ¶
func (_u *UserUpdateOne) RemoveChatMessageIDs(ids ...int) *UserUpdateOne
RemoveChatMessageIDs removes the "chat_messages" edge to ChatMessage entities by IDs.
func (*UserUpdateOne) RemoveChatMessages ¶
func (_u *UserUpdateOne) RemoveChatMessages(v ...*ChatMessage) *UserUpdateOne
RemoveChatMessages removes "chat_messages" edges to ChatMessage entities.
func (*UserUpdateOne) RemoveOwnedChatRoomIDs ¶
func (_u *UserUpdateOne) RemoveOwnedChatRoomIDs(ids ...int) *UserUpdateOne
RemoveOwnedChatRoomIDs removes the "owned_chat_rooms" edge to ChatRoom entities by IDs.
func (*UserUpdateOne) RemoveOwnedChatRooms ¶
func (_u *UserUpdateOne) RemoveOwnedChatRooms(v ...*ChatRoom) *UserUpdateOne
RemoveOwnedChatRooms removes "owned_chat_rooms" edges to ChatRoom entities.
func (*UserUpdateOne) RemoveOwner ¶
func (_u *UserUpdateOne) RemoveOwner(v ...*PasswordToken) *UserUpdateOne
RemoveOwner removes "owner" edges to PasswordToken entities.
func (*UserUpdateOne) RemoveOwnerIDs ¶
func (_u *UserUpdateOne) RemoveOwnerIDs(ids ...int) *UserUpdateOne
RemoveOwnerIDs removes the "owner" edge to PasswordToken entities by IDs.
func (*UserUpdateOne) Save ¶
func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (_u *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (_u *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAdmin ¶
func (_u *UserUpdateOne) SetAdmin(v bool) *UserUpdateOne
SetAdmin sets the "admin" field.
func (*UserUpdateOne) SetEmail ¶
func (_u *UserUpdateOne) SetEmail(v string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetName ¶
func (_u *UserUpdateOne) SetName(v string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableAdmin ¶
func (_u *UserUpdateOne) SetNillableAdmin(v *bool) *UserUpdateOne
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (_u *UserUpdateOne) SetNillableEmail(v *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (_u *UserUpdateOne) SetNillableName(v *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (_u *UserUpdateOne) SetNillablePassword(v *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePaymentCustomerID ¶
func (_u *UserUpdateOne) SetNillablePaymentCustomerID(id *int) *UserUpdateOne
SetNillablePaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableVerified ¶
func (_u *UserUpdateOne) SetNillableVerified(v *bool) *UserUpdateOne
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (_u *UserUpdateOne) SetPassword(v string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPaymentCustomer ¶
func (_u *UserUpdateOne) SetPaymentCustomer(v *PaymentCustomer) *UserUpdateOne
SetPaymentCustomer sets the "payment_customer" edge to the PaymentCustomer entity.
func (*UserUpdateOne) SetPaymentCustomerID ¶
func (_u *UserUpdateOne) SetPaymentCustomerID(id int) *UserUpdateOne
SetPaymentCustomerID sets the "payment_customer" edge to the PaymentCustomer entity by ID.
func (*UserUpdateOne) SetVerified ¶
func (_u *UserUpdateOne) SetVerified(v bool) *UserUpdateOne
SetVerified sets the "verified" field.
func (*UserUpdateOne) Where ¶
func (_u *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- chatban.go
- chatban_create.go
- chatban_delete.go
- chatban_query.go
- chatban_update.go
- chatmessage.go
- chatmessage_create.go
- chatmessage_delete.go
- chatmessage_query.go
- chatmessage_update.go
- chatroom.go
- chatroom_create.go
- chatroom_delete.go
- chatroom_query.go
- chatroom_update.go
- client.go
- ent.go
- generate.go
- mutation.go
- passwordtoken.go
- passwordtoken_create.go
- passwordtoken_delete.go
- passwordtoken_query.go
- passwordtoken_update.go
- paymentcustomer.go
- paymentcustomer_create.go
- paymentcustomer_delete.go
- paymentcustomer_query.go
- paymentcustomer_update.go
- paymentintent.go
- paymentintent_create.go
- paymentintent_delete.go
- paymentintent_query.go
- paymentintent_update.go
- paymentmethod.go
- paymentmethod_create.go
- paymentmethod_delete.go
- paymentmethod_query.go
- paymentmethod_update.go
- runtime.go
- subscription.go
- subscription_create.go
- subscription_delete.go
- subscription_query.go
- subscription_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go