(i *ent.OrgInvitation)
| 155 | } |
| 156 | |
| 157 | func entInviteToBiz(i *ent.OrgInvitation) *biz.OrgInvitation { |
| 158 | if i == nil { |
| 159 | return nil |
| 160 | } |
| 161 | |
| 162 | res := &biz.OrgInvitation{ |
| 163 | ID: i.ID, |
| 164 | ReceiverEmail: i.ReceiverEmail, |
| 165 | CreatedAt: toTimePtr(i.CreatedAt), |
| 166 | Status: i.Status, |
| 167 | Role: i.Role, |
| 168 | Context: &i.Context, |
| 169 | } |
| 170 | |
| 171 | if i.Edges.Organization != nil { |
| 172 | res.Org = entOrgToBizOrg(i.Edges.Organization) |
| 173 | } |
| 174 | |
| 175 | if i.Edges.Sender != nil { |
| 176 | res.Sender = entUserToBizUser(i.Edges.Sender) |
| 177 | } |
| 178 | |
| 179 | return res |
| 180 | } |
no test coverage detected