GORM Models
go
Generate Go structs with GORM struct tags from SQL schema
Usage
Add to your sqldoc.config.ts:
typescript
export default {
dialect: 'postgres',
schema: ['./schema.sql'],
codegen: [
{
template: 'gorm',
output: './generated/models.go',
},
],
}Then run:
bash
sqldoc codegen