Skip to content

Sellers (Pharmacies)

Table: public.sellers

Columns

Column Type Default Description
id uuid PK UUID
user_id uuid FK → profiles(id) Owner
store_name text NOT NULL Pharmacy name
store_slug text NOT NULL URL-friendly
store_logo text nullable Logo URL
store_banner text nullable Banner URL
store_description text nullable About
pharmacist_name text nullable Licensed pharmacist
pharmacist_license_number text nullable License ID
pharmacy_license_number text nullable Pharmacy license
business_registration text nullable Reg number
business_license_url text nullable Document
tax_id text nullable Tax ID
business_address text nullable Address
business_phone text nullable Contact
business_email text nullable Contact
operating_hours jsonb nullable Store hours
latitude float8 nullable GPS
longitude float8 nullable GPS
bank_name text nullable Payout bank
bank_account_name text nullable Account holder
bank_account_number text nullable Account #
commission_rate numeric 10.00 Platform commission %
approval_status text 'pending' pending, approved, rejected
is_featured boolean false Featured flag
rating numeric 0 Average rating
total_revenue numeric 0 Cumulative
total_orders integer 0 Order count
created_at timestamptz now()
updated_at timestamptz now()

Indexes

  • PK on id
  • Unique on user_id
  • Unique on store_slug
  • idx_sellers_approval_status on approval_status

RLS

  • Admins: full access
  • Owner: read/update own record
  • Public: read approved only