module.exports = class extends think.Model {
  get tableName() {
    return 'patient_sample_log';
  }

  async addLog(data = {}) {
    return this.add({
      patient_id: data.patient_id || 0,
      action: data.action || '',
      title: data.title || '',
      content: data.content || '',
      reason: data.reason || '',
      operator_type: data.operator_type || '',
      operator_id: data.operator_id || 0,
      operator_name: data.operator_name || '',
      create_time: data.create_time || think.datetime(new Date())
    });
  }
};
