1
0

test seven

This commit is contained in:
2024-04-11 06:11:26 +09:00
parent 1d5cb2ad9f
commit 833fbe5dbc
42 changed files with 15150 additions and 22 deletions

View File

@ -132,9 +132,11 @@ type UserEdges struct {
Ue []*Ue `json:"ue,omitempty"`
// Ma holds the value of the ma edge.
Ma []*Ma `json:"ma,omitempty"`
// Sev holds the value of the sev edge.
Sev []*Sev `json:"sev,omitempty"`
// loadedTypes holds the information for reporting if a
// type was loaded (or requested) in eager-loading or not.
loadedTypes [3]bool
loadedTypes [4]bool
}
// CardOrErr returns the Card value or an error if the edge
@ -164,6 +166,15 @@ func (e UserEdges) MaOrErr() ([]*Ma, error) {
return nil, &NotLoadedError{edge: "ma"}
}
// SevOrErr returns the Sev value or an error if the edge
// was not loaded in eager-loading.
func (e UserEdges) SevOrErr() ([]*Sev, error) {
if e.loadedTypes[3] {
return e.Sev, nil
}
return nil, &NotLoadedError{edge: "sev"}
}
// scanValues returns the types for scanning values from sql.Rows.
func (*User) scanValues(columns []string) ([]any, error) {
values := make([]any, len(columns))
@ -535,6 +546,11 @@ func (u *User) QueryMa() *MaQuery {
return NewUserClient(u.config).QueryMa(u)
}
// QuerySev queries the "sev" edge of the User entity.
func (u *User) QuerySev() *SevQuery {
return NewUserClient(u.config).QuerySev(u)
}
// 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.