policies.js 629 B

123456789101112131415161718192021222324252627282930313233
  1. import { entityKind } from "../entity.js";
  2. class GelPolicy {
  3. constructor(name, config) {
  4. this.name = name;
  5. if (config) {
  6. this.as = config.as;
  7. this.for = config.for;
  8. this.to = config.to;
  9. this.using = config.using;
  10. this.withCheck = config.withCheck;
  11. }
  12. }
  13. static [entityKind] = "GelPolicy";
  14. as;
  15. for;
  16. to;
  17. using;
  18. withCheck;
  19. /** @internal */
  20. _linkedTable;
  21. link(table) {
  22. this._linkedTable = table;
  23. return this;
  24. }
  25. }
  26. function gelPolicy(name, config) {
  27. return new GelPolicy(name, config);
  28. }
  29. export {
  30. GelPolicy,
  31. gelPolicy
  32. };
  33. //# sourceMappingURL=policies.js.map