UNPKG

angular-odata

Version:

Client side OData typescript library for Angular

38 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CsdlTypeDefinition = void 0; const csdl_annotation_1 = require("./csdl-annotation"); class CsdlTypeDefinition extends csdl_annotation_1.CsdlAnnotable { constructor(schema, { Name, UnderlayingType, MaxLength, Precision, Scale, Unicode, SRID, Annotation, }) { super({ Annotation }); this.schema = schema; this.Name = Name; this.UnderlayingType = UnderlayingType; this.MaxLength = MaxLength; this.Precision = Precision; this.Scale = Scale; this.Unicode = Unicode; this.SRID = SRID; } toJson() { const json = Object.assign(Object.assign({}, super.toJson()), { Name: this.Name, UnderlayingType: this.UnderlayingType }); if (this.MaxLength !== undefined) { json['MaxLength'] = this.MaxLength; } if (this.Precision !== undefined) { json['Precision'] = this.Precision; } if (this.Scale !== undefined) { json['Scale'] = this.Scale; } if (this.Unicode !== undefined) { json['Unicode'] = this.Unicode; } if (this.SRID !== undefined) { json['SRID'] = this.SRID; } return json; } } exports.CsdlTypeDefinition = CsdlTypeDefinition; //# sourceMappingURL=csdl-type-definition.js.map