let loadMigrationVersion: ApplicationMethods.LoadMigrationVersion
let updateMigrationVersion: ApplicationMethods.UpdateMigrationVersion
-export default function defineApplication (sequelize: Sequelize.Sequelize, DataTypes) {
+export default function defineApplication (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
Application = sequelize.define<ApplicationInstance, ApplicationAttributes>('Application',
{
migrationVersion: {
let Author: Sequelize.Model<AuthorInstance, AuthorAttributes>
let findOrCreateAuthor: AuthorMethods.FindOrCreateAuthor
-export default function defineAuthor (sequelize: Sequelize.Sequelize, DataTypes) {
+export default function defineAuthor (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
Author = sequelize.define<AuthorInstance, AuthorAttributes>('Author',
{
name: {
let Job: Sequelize.Model<JobInstance, JobAttributes>
let listWithLimit: JobMethods.ListWithLimit
-export default function defineJob (sequelize: Sequelize.Sequelize, DataTypes) {
+export default function defineJob (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
Job = sequelize.define<JobInstance, JobAttributes>('Job',
{
state: {
let loadFirstClient: OAuthClientMethods.LoadFirstClient
let getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret
-export default function (sequelize, DataTypes) {
- OAuthClient = sequelize.define('OAuthClient',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ OAuthClient = sequelize.define<OAuthClientInstance, OAuthClientAttributes>('OAuthClient',
{
clientId: {
type: DataTypes.STRING,
let getByRefreshTokenAndPopulateUser: OAuthTokenMethods.GetByRefreshTokenAndPopulateUser
let removeByUserId: OAuthTokenMethods.RemoveByUserId
-export default function (sequelize, DataTypes) {
- OAuthToken = sequelize.define('OAuthToken',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ OAuthToken = sequelize.define<OAuthTokenInstance, OAuthTokenAttributes>('OAuthToken',
{
accessToken: {
type: DataTypes.STRING,
let removeAll: PodMethods.RemoveAll
let updatePodsScore: PodMethods.UpdatePodsScore
-export default function (sequelize, DataTypes) {
- Pod = sequelize.define('Pod',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ Pod = sequelize.define<PodInstance, PodAttributes>('Pod',
{
host: {
type: DataTypes.STRING,
let RequestToPod: Sequelize.Model<RequestToPodInstance, RequestToPodAttributes>
let removeByRequestIdsAndPod: RequestToPodMethods.RemoveByRequestIdsAndPod
-export default function (sequelize, DataTypes) {
- RequestToPod = sequelize.define('RequestToPod', {}, {
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ RequestToPod = sequelize.define<RequestToPodInstance, RequestToPodAttributes>('RequestToPod', {}, {
indexes: [
{
fields: [ 'requestId' ]
let removeByRequestIdsAndPod: RequestVideoEventMethods.RemoveByRequestIdsAndPod
let removeAll: RequestVideoEventMethods.RemoveAll
-export default function (sequelize, DataTypes) {
- RequestVideoEvent = sequelize.define('RequestVideoEvent',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ RequestVideoEvent = sequelize.define<RequestVideoEventInstance, RequestVideoEventAttributes>('RequestVideoEvent',
{
type: {
type: DataTypes.ENUM(values(REQUEST_VIDEO_EVENT_TYPES)),
let removeByRequestIdsAndPod: RequestVideoQaduMethods.RemoveByRequestIdsAndPod
let removeAll: RequestVideoQaduMethods.RemoveAll
-export default function (sequelize, DataTypes) {
- RequestVideoQadu = sequelize.define('RequestVideoQadu',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ RequestVideoQadu = sequelize.define<RequestVideoQaduInstance, RequestVideoQaduAttributes>('RequestVideoQadu',
{
type: {
type: DataTypes.ENUM(values(REQUEST_VIDEO_QADU_TYPES)),
let removeWithEmptyTo: RequestMethods.RemoveWithEmptyTo
let removeAll: RequestMethods.RemoveAll
-export default function (sequelize, DataTypes) {
- Request = sequelize.define('Request',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ Request = sequelize.define<RequestInstance, RequestAttributes>('Request',
{
request: {
type: DataTypes.JSON,
let Tag: Sequelize.Model<TagInstance, TagAttributes>
let findOrCreateTags: TagMethods.FindOrCreateTags
-export default function (sequelize, DataTypes) {
- Tag = sequelize.define('Tag',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ Tag = sequelize.define<TagInstance, TagAttributes>('Tag',
{
name: {
type: DataTypes.STRING,
let UserVideoRate: Sequelize.Model<UserVideoRateInstance, UserVideoRateAttributes>
let load: UserVideoRateMethods.Load
-export default function (sequelize, DataTypes) {
- UserVideoRate = sequelize.define('UserVideoRate',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ UserVideoRate = sequelize.define<UserVideoRateInstance, UserVideoRateAttributes>('UserVideoRate',
{
type: {
type: DataTypes.ENUM(values(VIDEO_RATE_TYPES)),
let loadByUsername: UserMethods.LoadByUsername
let loadByUsernameOrEmail: UserMethods.LoadByUsernameOrEmail
-export default function (sequelize, DataTypes) {
- User = sequelize.define('User',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ User = sequelize.define<UserInstance, UserAttributes>('User',
{
password: {
type: DataTypes.STRING,
let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes>
let listForApi: VideoAbuseMethods.ListForApi
-export default function (sequelize, DataTypes) {
- VideoAbuse = sequelize.define('VideoAbuse',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ VideoAbuse = sequelize.define<VideoAbuseInstance, VideoAbuseAttributes>('VideoAbuse',
{
reporterUsername: {
type: DataTypes.STRING,
let loadById: BlacklistedVideoMethods.LoadById
let loadByVideoId: BlacklistedVideoMethods.LoadByVideoId
-export default function (sequelize, DataTypes) {
- BlacklistedVideo = sequelize.define('BlacklistedVideo',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ BlacklistedVideo = sequelize.define<BlacklistedVideoInstance, BlacklistedVideoAttributes>('BlacklistedVideo',
{},
{
indexes: [
let VideoTag: Sequelize.Model<VideoTagInstance, VideoTagAttributes>
-export default function (sequelize, DataTypes) {
- VideoTag = sequelize.define('VideoTag', {}, {
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ VideoTag = sequelize.define<VideoTagInstance, VideoTagAttributes>('VideoTag', {}, {
indexes: [
{
fields: [ 'videoId' ]
let loadAndPopulateAuthorAndPodAndTags: VideoMethods.LoadAndPopulateAuthorAndPodAndTags
let searchAndPopulateAuthorAndPodAndTags: VideoMethods.SearchAndPopulateAuthorAndPodAndTags
-export default function (sequelize, DataTypes) {
- Video = sequelize.define('Video',
+export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
+ Video = sequelize.define<VideoInstance, VideoAttributes>('Video',
{
id: {
type: DataTypes.UUID,