type BaseData = {
  _id: string
  tags: string[]
  isDeleted: boolean
}

type ExtendedBaseData = BaseData & {
  name: string
  shortname: string
  code: string
}

type Account = ExtendedBaseData & {
  active: boolean
  blocked: boolean
  expires: null | string
  owner: string
  organization: string
}

type Organization = ExtendedBaseData

export type UserState = BaseData & {
  _id: string
  nickname: string
  email: string
  organization: Organization
  account: Account
  title?: string
  firstname: string
  lastname: string
  email_verified: boolean
  active: boolean
  blocked: boolean
  passwordUpdated?: string
  signedTerms: boolean
  resetDate?: string
  createdAt: string
  updatedAt: string
  settings: {
    emailSignature?: string
  }
  ux: {
    lastProjectId: string
  }
}
