mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-03 19:24:59 +02:00
42 lines
1.4 KiB
GraphQL
42 lines
1.4 KiB
GraphQL
"Represents an assignable label for users that provides a configured group of permissions."
|
|
type Role @model(class: "App\\Models\\Auth\\Role") {
|
|
"The primary key of the resource"
|
|
id: Int!
|
|
|
|
"The label of the resource"
|
|
name: String!
|
|
|
|
"The hex representation of the color used to distinguish the resource"
|
|
color: String
|
|
|
|
"Is the role assigned on account verification?"
|
|
default: Boolean!
|
|
|
|
"The weight assigned to the resource, where higher values correspond to higher priority"
|
|
priority: Int!
|
|
|
|
"The date that the resource was created"
|
|
createdAt(format: String! = "Y-m-d H:i:s"): String @timestamp(attribute: "created_at")
|
|
|
|
"The date that the resource was updated"
|
|
updatedAt(format: String! = "Y-m-d H:i:s"): String @timestamp(attribute: "updated_at")
|
|
|
|
permissions(
|
|
default: Boolean @eq
|
|
priority_lesser: Int @where(operator: "<", key: "priority")
|
|
priority_greater: Int @where(operator: ">", key: "priority")
|
|
sort: [PermissionSort!] @sort
|
|
): [Permission!]! @belongsToManyCustom(type: CONNECTION, edgeType: "PermissionEdge")
|
|
}
|
|
|
|
type RoleEdge {
|
|
"The Role node."
|
|
node: Role!
|
|
|
|
"The date that the resource was created"
|
|
createdAt(format: String! = "Y-m-d H:i:s"): String @timestamp(attribute: "created_at")
|
|
|
|
"The date that the resource was updated"
|
|
updatedAt(format: String! = "Y-m-d H:i:s"): String @timestamp(attribute: "updated_at")
|
|
}
|