// DataTypes stub — used in Model.init() for schema registration
// In D1 shim, we collect these to know column types but don't create tables at runtime
// (tables are created via D1 migrations)

export const DataTypes = {
  STRING: (len?: number) => ({ type: 'TEXT', length: len }),
  TEXT: { type: 'TEXT' },
  INTEGER: { type: 'INTEGER' },
  BIGINT: { type: 'INTEGER' },
  FLOAT: { type: 'REAL' },
  DOUBLE: { type: 'REAL' },
  BOOLEAN: { type: 'INTEGER' },
  DATE: { type: 'TEXT' },
  DATEONLY: { type: 'TEXT' },
  JSON: { type: 'TEXT' },
  JSONB: { type: 'TEXT' },
  DECIMAL: (precision?: number, scale?: number) => ({ type: 'REAL', precision, scale }),
  BLOB: { type: 'BLOB' },
  ENUM: (...values: string[]) => ({ type: 'TEXT', values }),
  ARRAY: (itemType: any) => ({ type: 'TEXT', itemType }),
  VIRTUAL: { type: 'VIRTUAL' },
  UUID: { type: 'TEXT' },
  NOW: 'CF_NOW_PLACEHOLDER',
};
