Files
serpbear/database/models/domain.ts
towfiqi b2e97b2ebe feat: Adds the Ability to set Search Console Property type via Domain Settings.
- Previously only domain properties worked with SerpBear. This feature adds the ability to add URL properties as well.
- Adds a new field "search_console" in Domain Table.
- Adds a new Search Console option in Domain Settings Modal UI.
- When the  new "This is a URL Property" option is enabled, the exact Property URL should be provided.

closes #50
2024-02-06 23:42:28 +06:00

47 lines
1.3 KiB
TypeScript

import { Table, Model, Column, DataType, PrimaryKey, Unique } from 'sequelize-typescript';
@Table({
timestamps: false,
tableName: 'domain',
})
class Domain extends Model {
@PrimaryKey
@Column({ type: DataType.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true })
ID!: number;
@Unique
@Column({ type: DataType.STRING, allowNull: false, defaultValue: true, unique: true })
domain!: string;
@Unique
@Column({ type: DataType.STRING, allowNull: false, defaultValue: true, unique: true })
slug!: string;
@Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0 })
keywordCount!: number;
@Column({ type: DataType.STRING, allowNull: true })
lastUpdated!: string;
@Column({ type: DataType.STRING, allowNull: true })
added!: string;
@Column({ type: DataType.STRING, allowNull: true, defaultValue: JSON.stringify([]) })
tags!: string;
@Column({ type: DataType.BOOLEAN, allowNull: true, defaultValue: true })
notification!: boolean;
@Column({ type: DataType.STRING, allowNull: true, defaultValue: 'daily' })
notification_interval!: string;
@Column({ type: DataType.STRING, allowNull: true, defaultValue: '' })
notification_emails!: string;
@Column({ type: DataType.STRING, allowNull: true })
search_console!: string;
}
export default Domain;