import { AllowNull, Column, DataType, Model, PrimaryKey, Table } from 'sequelize-typescript';

@Table({
  charset: 'utf8',
  collate: 'utf8_general_ci',
  tableName: 'session',
})
export default class SessionModel extends Model<SessionModel> {
  //
  // ─── MODEL ATTRIBUTES ───────────────────────────────────────────────────────────
  //

  @PrimaryKey
  @AllowNull(false)
  @Column(DataType.STRING(36))
  sid!: string;

  @AllowNull(true)
  @Column(DataType.DATE)
  expires!: string;

  @AllowNull(true)
  @Column(DataType.TEXT)
  data!: string;
}
