import {
Table,
Column,
DataType,
CreatedAt,
UpdatedAt,
Model,
} from 'sequelize-typescript';
@Table({ tableName: 'object_Address' })
export class ObjectAddressModel extends Model {
@Column({
primaryKey: true,
allowNull: false,
type: DataType.STRING(255),
})
AddressId: string;
@Column({ allowNull: false, type: DataType.STRING(30) })
ObjectId: string;
@Column({ allowNull: false, type: DataType.STRING(30) })
ObjectType: string;
@Column({ allowNull: false, type: DataType.STRING(255) })
AddressLine1: string;
@Column({ type: DataType.STRING(255) })
AddressLine2: string;
@Column({ allowNull: false, type: DataType.STRING(255) })
City: string;
@Column({ type: DataType.STRING(255) })
State: string;
@Column({ allowNull: false, type: DataType.STRING(20) })
PostalCode: string;
@Column({ allowNull: false, type: DataType.STRING(255) })
Country: string;
@Column({ type: DataType.DECIMAL(10, 2) })
Latitude: number;
@Column({ type: DataType.DECIMAL(10, 2) })
Longitude: number;
@Column({ type: DataType.STRING(255) })
AddressType: string;
@Column({ type: DataType.STRING(1) })
IsDefaultYN: string;
@Column({
allowNull: false,
type: DataType.ENUM('Active', 'Inactive', 'Deleted', 'Suspended'),
})
Status: string;
@Column({ allowNull: false, type: DataType.STRING(30) })
CreatedById: string;
@CreatedAt
CreatedAt: Date;
@Column({ allowNull: false, type: DataType.STRING(30) })
UpdatedById: string;
@UpdatedAt
UpdatedAt: Date;
}