All files / src/models/scan holiday-calendar.model.ts

100% Statements 11/11
100% Branches 0/0
100% Functions 0/0
100% Lines 9/9

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 461x 1x               1x         1x             1x           1x           1x     1x     1x            
import {Entity, model, property} from '@loopback/repository';
import {BaseEntity} from '../base-entity';
 
@model({
  name: 'holiday_calendar',
  settings: {
    postgresql: {schema: 'public', table: 'holiday_calendar'},
  },
})
export class HolidayCalendar extends BaseEntity {
  @property({
    type: 'date',
    required: true,
  })
  holiday_date: Date; // Date of the holiday
 
  @property({
    type: 'string',
    length: 255,
    required: true,
  })
  holiday_name: string; // Name of the holiday
 
  @property({
    type: 'string',
    length: 10,
  })
  country_code?: string; // Country code (e.g., 'VN', 'SING')
 
  @property({
    type: 'boolean',
    default: true,
  })
  is_active?: boolean; // Active/Inactive status
 
  @property({type: 'date'})
  created_at?: Date;
 
  @property({type: 'date'})
  updated_at?: Date;
}
 
export interface HolidayCalendarRelations {}
 
export type HolidayCalendarWithRelations = HolidayCalendar & HolidayCalendarRelations;