mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
15 lines
588 B
TypeScript
15 lines
588 B
TypeScript
import { DataTypes, Model, type CreationOptional, type InferAttributes, type InferCreationAttributes, type NonAttribute } from '@sequelize/core';
|
|
import { Attribute, PrimaryKey, AutoIncrement, Default, BelongsToMany, Table, NotNull, HasMany } from '@sequelize/core/decorators-legacy';
|
|
|
|
import Album from './album';
|
|
|
|
@Table({ freezeTableName: true })
|
|
export default class Artist extends Model<InferAttributes<Artist>, InferCreationAttributes<Artist>> {
|
|
@PrimaryKey
|
|
@Attribute(DataTypes.STRING)
|
|
declare slug: string
|
|
|
|
@Attribute(DataTypes.STRING)
|
|
@NotNull
|
|
declare name: string
|
|
}
|