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

class origin_data_model extends BaseModel {
    constructor() {
        super('origin_data'); //表名
    }

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

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

    async updateOriginData(video_id, profileData) {
        return await this.update({ video_id: video_id }, profileData);
    }
}

module.exports = new origin_data_model();