rooms.model.ts 992 Bytes
Newer Older
1 2
import { RoomDetail } from "./RoomDetail.model"
export interface Room {
3 4
    rId: number;
    rName: string;
5
    rType : string;
6
    rPic: string;
7
    roomLimit: number;
8
    rDesc: string;
9 10 11 12 13 14 15 16 17
}
export class MyRoom implements Room{
    rId: number;
    rName: string;
    rType : string;
    rPic: string;
    roomLimit: number;
    rDesc: string;
  static rName: any;
18
    constructor(init?: Room) {
19 20 21
        // Object.assign(this, init);
        this.rId = init?.rId!;
        this.rName = init?.rName!;
22
        this.rPic = 'assets/img/nopic.jpg';
23
        this.roomLimit = 0;
24
        this.rDesc = '';
25
      
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    }
}

export interface SearchRoomModel {
    sdate: string;
    edate: string;
    stime: string;
    etime: string;
    roomlimit: number;
}

export class SearchRoomModel {
    constructor(init?: SearchRoomModel) {
        Object.assign(this, init);
        this.sdate = '',
        this.edate = '',
        this.stime = '',
        this.etime = '',
        this.roomlimit = 0;
    }
}