Good Empire Schema/Resources

UserResource

Field
Type
Description
Example

Primary Field




id
Integer
Primary key
1
phone_number
String | unique
User phone number without any symbols
639451111111
raw_phone_number
String
Original phone number format with symbols
+639451111111, +63-2-8123-4567
first_name
String | nullable
User first name 
John 
last_name
String | nullable
User last name
Doe
username
String
Unique username of the user without @ symbol | nullable
xxjohndoexx
email
String | optional | nullable
User email address
job@doe.com
bio
String | opttional | nullable
User short bio
I’m a f**king nature lover
impact_points
Integer
The accumulated points of the user
100
has_joined
Boolean

true | false
created_at
String
User registered date | ISO format
2021-06-06T13:20:56.000000Z
updated_at
String
Whenever the user has updated any field | ISO format
2021-06-06T13:20:56.000000Z

Includable Properties




avatar
User profile picture | nullable | optional

organisation
The Organisation this users belongs to | optional


MediaResource

Field
Type
Description
Example

Primary Field




id
Integer
Primary key
1
name
String
Original name of the file
avatar.jpg
file_name
String
Generated name of the file
98015ba572236f49f0468a9d968d4a51.jpg
collection_name
String
The collection group which this media belongs to
AVATAR 
mime_type
String
MIME type of the file
image/jpeg
size
Integer
Size of the file in bytes
16058
created_at
String
The date when a file is uploaded | ISO format
2021-06-06T13:20:56.000000Z
url
String
The full url of the file
thumb_url
String
The thumbnail url or the file | Only exist if applicable

MissionResource

Field
Type
Description
Example

Primary Field




id
Integer
Primary key
1
number
Integer
Mission number
1
title
String
Mission title
Help 1 million people out of poverty
name
String
Mission name
No poverty 
description
String
Mission description
End poverty in all its forms everywhere
color
String
Color of the icons and text in hex
#486EAA
icon
String
Icon image url
created_at
String
The date when a mission is added | ISO format
2021-06-06T13:20:56.000000Z
updated_at
String
The date when a mission is updated | ISO format
2021-06-06T13:20:56.000000Z

ChallengeResource

Field
Type
Description
Example

Primary Field




id
Integer
Primary key
1
mission_id
Integer
Mission number
1
title
String
Mission title
Help 1 million people out of poverty