// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback4-example-shopping
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import { Entity, model, property } from '@loopback/repository'

@model()
export class UserCredentials extends Entity {
  @property({
    type: 'string',
    id: true,
    mongodb: { dataType: 'ObjectID' }
  })
  id: string

  @property({
    type: 'string',
    required: true
  })
  password: string

  @property({
    type: 'string',
    required: true,
    mongodb: { dataType: 'ObjectID' }
  })
  userId: string

  constructor(data?: Partial<UserCredentials>) {
    super(data)
  }
}

export interface UserCredentialsRelations {}

export type UserCredentialsWithRelations = UserCredentials &
  UserCredentialsRelations
