| 2050 | } |
| 2051 | |
| 2052 | func (c *OrgInvitationClient) mutate(ctx context.Context, m *OrgInvitationMutation) (Value, error) { |
| 2053 | switch m.Op() { |
| 2054 | case OpCreate: |
| 2055 | return (&OrgInvitationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 2056 | case OpUpdate: |
| 2057 | return (&OrgInvitationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 2058 | case OpUpdateOne: |
| 2059 | return (&OrgInvitationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 2060 | case OpDelete, OpDeleteOne: |
| 2061 | return (&OrgInvitationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) |
| 2062 | default: |
| 2063 | return nil, fmt.Errorf("ent: unknown OrgInvitation mutation op: %q", m.Op()) |
| 2064 | } |
| 2065 | } |
| 2066 | |
| 2067 | // OrganizationClient is a client for the Organization schema. |
| 2068 | type OrganizationClient struct { |