/** Defines a database check constraint on a property (TC39 decorator). */
export function Check(options) {
  return function (value, context) {
    const meta = context.metadata;
    meta.checks ??= [];
    options.property ??= context.name;
    meta.checks.push(options);
  };
}
