File

projects/wms-framework/src/lib/models/controls/test/Person.ts

Index

Properties
Accessors

Constructor

constructor(name?: string, bdate?: Date, bdateNoInfo?: Date)
Parameters :
Name Type Optional
name string Yes
bdate Date Yes
bdateNoInfo Date Yes

Properties

Private _birthDate
Type : Date
Private _birthDateWithoutInfo
Type : Date
Private _name
Type : string

Accessors

name
getname()
setname(v: string)
Parameters :
Name Type Optional
v string No
Returns : void
birthDate
getbirthDate()
setbirthDate(v: Date)
Parameters :
Name Type Optional
v Date No
Returns : void
birthDateWithoutInfo
getbirthDateWithoutInfo()
setbirthDateWithoutInfo(v: Date)
Parameters :
Name Type Optional
v Date No
Returns : void
import { propertyInfo } from '../../../baseframework/ReflectionSupport';
import { ClassInfo } from '../../../decorators/ClassInfo';

@ClassInfo({
  classId: 'Person',
})
export class Person {
  private _name: string;

  constructor(name?: string, bdate?: Date, bdateNoInfo?: Date) {
    if (name && bdate) {
      this.name = name;
      this.birthDate = bdate;
    }
    if (bdateNoInfo) {
      this.birthDateWithoutInfo = bdateNoInfo;
    }
  }

  @propertyInfo()
  public get name(): string {
    return this._name;
  }
  public set name(v: string) {
    this._name = v;
  }

  private _birthDate: Date;
  @propertyInfo()
  public get birthDate(): Date {
    return this._birthDate;
  }
  public set birthDate(v: Date) {
    this._birthDate = v;
  }

  private _birthDateWithoutInfo: Date;
  public get birthDateWithoutInfo(): Date {
    return this._birthDateWithoutInfo;
  }
  public set birthDateWithoutInfo(v: Date) {
    this._birthDateWithoutInfo = v;
  }
}

result-matching ""

    No results matching ""