Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xx messenger iOS
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
xx messenger iOS
Commits
d47c9e47
Commit
d47c9e47
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add Report model
parent
86fa1b84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/ReportingFeature/Report.swift
+43
-0
43 additions, 0 deletions
Sources/ReportingFeature/Report.swift
with
43 additions
and
0 deletions
Sources/ReportingFeature/Report.swift
0 → 100644
+
43
−
0
View file @
d47c9e47
import
Foundation
public
struct
Report
:
Encodable
{
public
init
(
sender
:
ReportUser
,
recipient
:
ReportUser
,
type
:
ReportType
,
screenshot
:
Data
)
{
self
.
sender
=
sender
self
.
recipient
=
recipient
self
.
type
=
type
self
.
screenshot
=
screenshot
}
public
var
sender
:
ReportUser
public
var
recipient
:
ReportUser
public
var
type
:
ReportType
public
var
screenshot
:
Data
}
extension
Report
{
public
struct
ReportUser
:
Encodable
{
public
init
(
userId
:
String
,
username
:
String
)
{
self
.
userId
=
userId
self
.
username
=
username
}
public
var
userId
:
String
public
var
username
:
String
}
}
extension
Report
{
public
enum
ReportType
:
String
,
Encodable
{
case
dm
case
group
case
channel
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment