Reformatted the attachment model
This commit is contained in:
parent
dff64b31a4
commit
de220ae02a
@ -1,12 +1,29 @@
|
||||
import { Association, BelongsToGetAssociationMixin, BelongsToManyGetAssociationsMixin, CreationOptional, DataTypes, ForeignKey, InferAttributes, InferCreationAttributes, Model, NonAttribute, Sequelize } from "@sequelize/core";
|
||||
import { Post } from "./Post";
|
||||
import {
|
||||
Association,
|
||||
CreationOptional,
|
||||
DataTypes,
|
||||
ForeignKey,
|
||||
InferAttributes,
|
||||
InferCreationAttributes,
|
||||
Model,
|
||||
NonAttribute
|
||||
} from "@sequelize/core";
|
||||
|
||||
import {
|
||||
Attribute,
|
||||
AutoIncrement,
|
||||
BelongsTo,
|
||||
NotNull,
|
||||
PrimaryKey,
|
||||
Unique
|
||||
} from "@sequelize/core/decorators-legacy";
|
||||
|
||||
import { SqliteDialect } from '@sequelize/sqlite3';
|
||||
import { Attribute, AutoIncrement, BelongsTo, BelongsToMany, NotNull, PrimaryKey, Unique } from "@sequelize/core/decorators-legacy";
|
||||
import { Bucket } from "./Bucket";
|
||||
import { UUID } from "crypto";
|
||||
type AttachmentAttributes = InferAttributes<Attachment>;
|
||||
type AttachmentCreationAttributes = InferCreationAttributes<Attachment>;
|
||||
|
||||
export class Attachment extends Model<AttachmentAttributes,AttachmentCreationAttributes> {
|
||||
|
||||
export class Attachment extends Model<InferAttributes<Attachment>, InferCreationAttributes<Attachment>> {
|
||||
@PrimaryKey
|
||||
@AutoIncrement
|
||||
@Attribute(DataTypes.INTEGER)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user