Add fields on User
This commit is contained in:
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "up_users",
|
||||||
|
"info": {
|
||||||
|
"name": "user",
|
||||||
|
"description": "",
|
||||||
|
"singularName": "user",
|
||||||
|
"pluralName": "users",
|
||||||
|
"displayName": "User"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 3,
|
||||||
|
"unique": true,
|
||||||
|
"configurable": false,
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "email",
|
||||||
|
"minLength": 6,
|
||||||
|
"configurable": false,
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"type": "string",
|
||||||
|
"configurable": false
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "password",
|
||||||
|
"minLength": 6,
|
||||||
|
"configurable": false,
|
||||||
|
"private": true,
|
||||||
|
"searchable": false
|
||||||
|
},
|
||||||
|
"resetPasswordToken": {
|
||||||
|
"type": "string",
|
||||||
|
"configurable": false,
|
||||||
|
"private": true,
|
||||||
|
"searchable": false
|
||||||
|
},
|
||||||
|
"confirmationToken": {
|
||||||
|
"type": "string",
|
||||||
|
"configurable": false,
|
||||||
|
"private": true,
|
||||||
|
"searchable": false
|
||||||
|
},
|
||||||
|
"confirmed": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"configurable": false
|
||||||
|
},
|
||||||
|
"blocked": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"configurable": false
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "manyToOne",
|
||||||
|
"target": "plugin::users-permissions.role",
|
||||||
|
"inversedBy": "users",
|
||||||
|
"configurable": false
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"allowedTypes": [
|
||||||
|
"images"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nbFollowers": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"nbFollowing": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"nbPosts": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"nbSaved": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6
types/generated/contentTypes.d.ts
vendored
6
types/generated/contentTypes.d.ts
vendored
@@ -824,9 +824,9 @@ export interface PluginUsersPermissionsUser
|
|||||||
};
|
};
|
||||||
options: {
|
options: {
|
||||||
draftAndPublish: false;
|
draftAndPublish: false;
|
||||||
timestamps: true;
|
|
||||||
};
|
};
|
||||||
attributes: {
|
attributes: {
|
||||||
|
avatar: Schema.Attribute.Media<'images'>;
|
||||||
blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
||||||
confirmationToken: Schema.Attribute.String & Schema.Attribute.Private;
|
confirmationToken: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
confirmed: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
confirmed: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
||||||
@@ -844,6 +844,10 @@ export interface PluginUsersPermissionsUser
|
|||||||
'plugin::users-permissions.user'
|
'plugin::users-permissions.user'
|
||||||
> &
|
> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
nbFollowers: Schema.Attribute.Integer & Schema.Attribute.DefaultTo<0>;
|
||||||
|
nbFollowing: Schema.Attribute.Integer & Schema.Attribute.DefaultTo<0>;
|
||||||
|
nbPosts: Schema.Attribute.Integer & Schema.Attribute.DefaultTo<0>;
|
||||||
|
nbSaved: Schema.Attribute.Integer & Schema.Attribute.DefaultTo<0>;
|
||||||
password: Schema.Attribute.Password &
|
password: Schema.Attribute.Password &
|
||||||
Schema.Attribute.Private &
|
Schema.Attribute.Private &
|
||||||
Schema.Attribute.SetMinMaxLength<{
|
Schema.Attribute.SetMinMaxLength<{
|
||||||
|
|||||||
Reference in New Issue
Block a user