
const BaseModel = require('../BaseModel')

class filter_data_model extends BaseModel {
    constructor() {
        super('filter_data'); //表名
    }

    async findByVideoId(VideoId) {
        return await this.findOne({ VideoId });
    }

    async createFilterData(tableData) {
        return await this.transaction(async (connection) => {
            const id = await this.create(tableData);
            return id;
        });
    }

    async updateFilterData(id, profileData) {
        return await this.update({ id: id }, profileData);
    }
}

module.exports =  new filter_data_model();