chore: reorganize docs apps (#7228)

* reorganize docs apps

* add README

* fix directory

* add condition for old docs
This commit is contained in:
Shahed Nasser
2024-05-03 17:36:38 +03:00
committed by GitHub
parent 224ebb2154
commit 4fe28f5a95
6187 changed files with 601447 additions and 598226 deletions
@@ -0,0 +1,23 @@
export const metadata = {
title: `Customer Accounts`,
}
# {metadata.title}
In this document, youll learn how registered and unregistered accounts are distinguished in the Medusa application.
## `has_account` field
The `Customer` data model has a `has_account` field, which is a boolean that indicates whether a customer is registerd.
When a guest customer places an order, a new `Customer` record is created with `has_account` set to `false`.
When this or another guest customer registers an account with the same email, a new `Customer` record is created with `has_account` set to `true`.
---
## Email Uniqueness
The above behavior means that two `Customer` records may exist of the same email. However, the main difference is the `has_account` fields value.
So, there can only be one guest customer (having `has_account=false`) and one registered customer (having `has_account=true`) with the same email. If another customer tries to create an account with the same email, theyll get an error that an account with this email already exists.