import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';

class ProductType extends Model { }

ProductType.init({
    labelTr: {
        type: DataTypes.STRING,
        allowNull: false},
    category: {
        type: DataTypes.INTEGER,
        allowNull: false},
    productionTime: {
        type: DataTypes.INTEGER,
        allowNull: false},
    sellCost: {
        type: DataTypes.INTEGER,
        allowNull: false}
}, {
    sequelize,
    modelName: 'ProductType',
    tableName: 'product',
    schema: 'falukant_type',
    timestamps: false,
    underscored: true,
    indexes: [
        {
            unique: true,
            fields: ['label_tr']
        }
    ]});

export default ProductType;
