{
  "kind": "collectionType",
  "collectionName": "up_users",
  "info": {
    "name": "user",
    "description": "",
    "singularName": "user",
    "pluralName": "users",
    "displayName": "User"
  },
  "options": {
    "timestamps": true
  },
  "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
    },
    "phone": {
      "type": "string"
    },
    "fullName": {
      "type": "string"
    },
    "gender": {
      "type": "enumeration",
      "enum": ["male", "female", "other"]
    },
    "birthDate": {
      "type": "date"
    },
    "isPhoneVerified": {
      "type": "boolean",
      "default": false
    },
    "verificationCode": {
      "type": "string"
    },
    "verificationCodeExpiry": {
      "type": "datetime"
    },
    "merchantCode": {
      "type": "string"
    },
    "avatar": {
      "type": "media",
      "allowedTypes": ["images"],
      "multiple": false
    },
    "addresses": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::address.address",
      "mappedBy": "user"
    },
    "orders": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::order.order",
      "mappedBy": "user"
    },
    "reviews": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::review.review",
      "mappedBy": "user"
    },
    "favoriteProducts": {
      "type": "json",
      "default": []
    },
    "cart": {
      "type": "relation",
      "relation": "oneToOne",
      "target": "api::cart.cart",
      "mappedBy": "user"
    },
    "notificationSettings": {
      "type": "json",
      "default": {
        "orderUpdates": true,
        "promotions": true,
        "wishlistAlerts": true
      }
    },
    "notifications": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::notification.notification",
      "mappedBy": "user"
    }
  }
}
