import * as mongoose from "mongoose";

export default new mongoose.Schema({
    name: {
        type: String,
        required: true
    },
    color: {
        type: String,
        required: true
    },
    value: {
        type: String,
        required: true
    },
    count: {
        type: String,
        required: true
    },
    info: {
        type: String,
        required: true
    },
    special: {
        type: String,
        required: true
    },
    frontImage: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "File",
        required: true
    },
    backImage: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "File",
        required: true
    },
    createDate: 'date',
    updatedDate: 'date'
}, {
    timestamps: {
        // @ts-ignore
        createDate: 'created_at',
        updatedDate: 'updated_at'
    }
});
