All files / src/models/scan pmo.model.ts

94.29% Statements 33/35
100% Branches 0/0
0% Functions 0/2
93.94% Lines 31/33

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 971x 1x 1x 1x 1x               1x   1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x     1x         1x         1x     1x     1x            
import {Entity, model, property, belongsTo} from '@loopback/repository';
import {Shipment} from './shipment.model';
import {Box} from './box.model';
import {PmoStatus} from '@logchain/types';
import {BaseEntity} from '../base-entity';
 
@model({
  name: 'pmo',
  settings: {
    postgresql: {schema: 'public', table: 'pmo'},
  },
})
export class Pmo extends BaseEntity {
  @property({type: 'string', required: true, length: 50})
  code: string;
 
  @property({type: 'number'})
  eq_no?: number;
 
  @property({type: 'string'})
  po?: string;
 
  @property({type: 'string', length: 50})
  trent_type?: string;
 
  @property({type: 'number'})
  esn?: number;
 
  @property({type: 'string', length: 100})
  serial_no?: string;
 
  @property({type: 'number'})
  qty?: number;
 
  @property({type: 'string'})
  description?: string;
 
  @property({type: 'string'})
  part_no?: string;
 
  @property({type: 'string'})
  part_desc?: string;
 
  @property({type: 'number'})
  equipment?: number;
 
  @property({type: 'number'})
  order_no?: number;
 
  @property({type: 'number', required: true})
  status: PmoStatus;
 
  @property({type: 'string', length: 50})
  status_display?: string;
 
  @property({type: 'string', length: 50})
  action?: string;
 
  @property({type: 'string'})
  repair_vendor?: string;
 
  @property({type: 'string'})
  forwarder?: string;
 
  @property({type: 'string'})
  tracking_no?: string;
 
  @property({type: 'string',})
  country_code?: string;
 
  @property({type: 'date'})
  synced_date?: Date;
 
  @property({type: 'string'})
  remark?: string;
 
  @belongsTo(() => Shipment, {
    name: 'shipment',
  })
  shipment_id?: number;
 
  @belongsTo(() => Box, {
    name: 'box',
  })
  box_id?: number | null;
 
  @property({type: 'date'})
  created_at?: Date;
 
  @property({type: 'date'})
  updated_at?: Date;
}
 
export interface PmoRelations {}
 
export type PmoWithRelations = Pmo & PmoRelations;