DepartmentMember

URL

https://api.primaerp.com/v1/departmentmembers

Properties

Name Type Access Required Description
createdAt Date read only no Date of creation.
department Department read write YES The department of the account member.
displayName String read only no Describes an object in human readable form.
id String read write no Unique object identifier.
trashItem TrashItem read write no Informs whether an object is in the trash. An object is in the trash if a trash item was specified.
updatedAt Date read only no Last modified date.
user User read write YES User who is a member.
version Long read write no Object version number.

Metadata

{
    "type" : "DepartmentMember",
    "path" : "/v1/departmentmembers",
    "fields" : [
        {
            "type" : "Date",
            "name" : "createdAt",
            "description" : "Date of creation.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "Department",
            "path" : "/v1/departments",
            "name" : "department",
            "description" : "The department of the account member.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "displayName",
            "description" : "Describes an object in human readable form.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "String",
            "name" : "id",
            "description" : "Unique object identifier.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Pattern",
                    "details" : "regexp [0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}"
                },
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "TrashItem",
            "path" : "/v1/trash",
            "name" : "trashItem",
            "description" : "Informs whether an object is in the trash. An object is in the trash if a trash item was specified.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "Date",
            "name" : "updatedAt",
            "description" : "Last modified date.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "User",
            "path" : "/v1/users",
            "name" : "user",
            "description" : "User who is a member.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "Long",
            "name" : "version",
            "description" : "Object version number.",
            "access" : "READ_WRITE"
        }
    ],
    "cascades" : [
        {
            "cascadeType" : "REMOVE",
            "objectTypes" : [
                "TrashItem"
            ]
        }
    ]
}

Dummy data

{
    "id" : "79d63841-3085-4ce9-be13-ad3af9a8776d",
    "createdAt" : "/Date(1489387573885)/",
    "updatedAt" : "/Date(1489452793885)/",
    "version" : 7,
    "user" : {
        "id" : "c1f53273-2b90-4692-9c08-bb005af8ba31",
        "createdAt" : "/Date(1489384873885)/",
        "updatedAt" : "/Date(1489416793885)/",
        "version" : 1,
        "firstName" : "John",
        "lastName" : "Doe",
        "nickName" : "Johny D.",
        "email" : "john.doe@example.com",
        "phone" : "55 234 555 678",
        "position" : "Senior developer",
        "timeZone" : "America/Sao_Paulo",
        "dateFormat" : "yyyy-MM-dd",
        "timeFormat" : "K:mm a",
        "weekStart" : 7,
        "language" : "pt_BR",
        "password" : "",
        "secretKey" : "userSecretKey",
        "confirmed" : false,
        "confirmedEmail" : false,
        "active" : false,
        "birthdayRemind" : "/Date(1491256800000)/",
        "workingTimeStart" : "/Date(1489388400000)/",
        "workingTimeEnd" : "/Date(1489420800000)/",
        "created" : "/Date(1489301593885)/",
        "admin" : false,
        "projectManager" : false,
        "displayName" : "Doe John"
    },
    "department" : {
        "id" : "3818ac2a-1b03-419e-8c96-7f1807839555",
        "createdAt" : "/Date(1489385773885)/",
        "updatedAt" : "/Date(1489405993885)/",
        "version" : 5,
        "name" : "Development",
        "manager" : {
            "id" : "1117bb0c-6489-4e22-9146-2a2ce02904d4",
            "createdAt" : "/Date(1489387813885)/",
            "updatedAt" : "/Date(1489441993885)/",
            "version" : 3,
            "firstName" : "John",
            "lastName" : "Smith",
            "nickName" : "Smith, J.",
            "email" : "john.smith@example.com",
            "phone" : "55 123 444 567",
            "position" : "Chief developer",
            "timeZone" : "America/Sao_Paulo",
            "dateFormat" : "dd/MM/yyyy",
            "timeFormat" : "K:mm a",
            "weekStart" : 7,
            "language" : "en_US",
            "password" : "",
            "secretKey" : "userSecretKey",
            "confirmed" : false,
            "confirmedEmail" : false,
            "active" : false,
            "birthdayRemind" : "/Date(1490223600000)/",
            "workingTimeStart" : "/Date(1489388400000)/",
            "workingTimeEnd" : "/Date(1489420800000)/",
            "created" : "/Date(1489301593885)/",
            "admin" : false,
            "projectManager" : false,
            "displayName" : "Smith John"
        },
        "displayName" : "Development"
    },
    "displayName" : "Doe John"
}