Attribute.ts 397 B

12345678910111213141516
  1. import { Types } from "../Schema";
  2. import { AttributeValue } from "./AttributeValue";
  3. import { Document } from "./Document";
  4. export type Attribute = {
  5. type: Types;
  6. required: boolean;
  7. restricted: boolean;
  8. item?: Pick<Attribute, "type" | "item" | "schema">;
  9. schema?: Document;
  10. defaultValue?: AttributeValue;
  11. unique?: boolean;
  12. min?: number;
  13. max?: number;
  14. enumValues?: AttributeValue[];
  15. };