billing_paywall_rule.cjs 430 Bytes
const tableName = 'billing_paywall_rule'

function buildTable(t) {
  t.string('content_id', 96).primary()
  t.integer('free_episodes').notNullable().defaultTo(0)
  t.integer('free_continue_per_day').notNullable().defaultTo(0)
  t.text('prices_json', 'longtext').notNullable()
  t.boolean('active').notNullable().defaultTo(true)
  t.datetime('updated_at', { precision: 3 }).nullable()
}

module.exports = { tableName, buildTable }