Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
498 B
3
Indexable
Never
export class CustomNamingStrategy extends DefaultNamingStrategy {
  tableName(className: string, customName: string): string {
    return snakeCase(super.tableName(className, customName));
  }

  columnName(propertyName: string, customName: string, embeddedPrefixes: string[]): string {
    return snakeCase(super.columnName(propertyName, customName, embeddedPrefixes));
  }

  relationName(propertyName: string): string {
    return snakeCase(super.relationName(propertyName));
  }
}