mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Snake case table names
This commit is contained in:
parent
971d4f2ce6
commit
3530c46b0e
4 changed files with 1728 additions and 12 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { DataTypes, Model, type BelongsToManyGetAssociationsMixin, type CreationOptional, type InferAttributes, type InferCreationAttributes, type NonAttribute } from '@sequelize/core';
|
||||
import { Attribute, PrimaryKey, AutoIncrement, Default, BelongsToMany } from '@sequelize/core/decorators-legacy';
|
||||
import { Attribute, PrimaryKey, AutoIncrement, Default, BelongsToMany, Table } from '@sequelize/core/decorators-legacy';
|
||||
|
||||
import Category from './category';
|
||||
import Artist from './artist';
|
||||
|
||||
Table({ tableName: 'albums' })
|
||||
export default class Album extends Model<InferAttributes<Album>, InferCreationAttributes<Album>> {
|
||||
@Attribute(DataTypes.INTEGER)
|
||||
@PrimaryKey
|
||||
|
|
@ -28,7 +29,7 @@ export default class Album extends Model<InferAttributes<Album>, InferCreationAt
|
|||
@Attribute(DataTypes.STRING)
|
||||
declare description: string
|
||||
|
||||
@Attribute(DataTypes.ENUM('show', 'hidden', 'coming'))
|
||||
@Attribute(DataTypes.STRING)
|
||||
@Default('hidden')
|
||||
declare status: CreationOptional<string>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue